Reset accordion
Reset accordion
Hi All,
I'm trying to create a function who resets the accordion to its
initial state.
What I've got is this:
$.fn.resetAccordion =function(){
$('#navigation a.highlighted,#navigation a.selected,#navigation a.ui-
state-active').removeClass("highlighted selected ui-state-active");
$(this).accordion( 'activate' , false);
};
$('#navigation').resetAccordion();
Can someone help me to do it in a better way?
thanks