Accordion demo: Don't use .toggle(fn).

This commit is contained in:
Scott González 2012-05-21 10:04:23 -04:00
parent 33a91fb19e
commit 820cff8a67

View File

@ -19,10 +19,12 @@
$( "#accordion" ).accordion({
icons: icons
});
$( "#toggle" ).button().toggle(function() {
$( "#accordion" ).accordion( "option", "icons", null );
}, function() {
$( "#accordion" ).accordion( "option", "icons", icons );
$( "#toggle" ).button().click(function() {
if ( $( "#accordion" ).accordion( "option", "icons" ) ) {
$( "#accordion" ).accordion( "option", "icons", null );
} else {
$( "#accordion" ).accordion( "option", "icons", icons );
}
});
});
</script>