Hi
I have some tabs, and want to do a onselect for a specific tab. I have this code, it works, but I think it can be done more "smooth" (do the on select for a specific tab)
$(document).ready(function(){
$('#tttabs').tabs({
onSelect: function(title, index){
var tab = $('#tttabs').tabs('getSelected');
var hest = $('#tttabs').tabs('getTabIndex',tab);
//alert(hest);
if(hest == 1) {
//////////////////////////////////////////////
$('#left option').each(function(index, option) {
$(option).remove();
});
////////////////////////
$.getJSON('selectMenus.php', function(data){
$.each(data, function(index,item) {
$("#left").append("<option value=" + item.phone+ ">" + item.firstname + " " + item.lastname +"</option>");
});
});
////////////////////
}
}
});
});
/Jesper