Accordion - disabling specific tab
Hello
I have this code to control the accordion...
my need is that when i press a specific tab lets say Language... i
need to check a boolena flag
if its false, i need to be able not to open that specific tab at all.
is that can be achived ?
jQuery().ready(function() {
// simple accordion
$('#accordion').accordion({ header: 'h3',
active: false,
collapsible: true,
autoheight: false,
clearStyle: true,
changestart: function(event, ui) {
//alert($(ui.newContent).attr("id") + " was
opened, " + $
// (ui.oldContent).attr("id") + " was
closed");
switch ($(ui.newContent).attr("id")) {
case "Education":
updated("Education");
break;
case "Language":
updated("Language");
break;
case "Work":
updated("Work");
break;
}
}
});
});