Hello,
I'm using this code to make the accordion sortable, and to make the active accordion panel move to the top of the stack:
$(function() {
var stop = false;
$("#ccaccordion h3").click(function( event ) {
if ( stop ) {
event.stopImmediatePropagation();
event.preventDefault();
stop = false;
}
});
$("#ccaccordion").accordion({
header: "> div > h3",
autoHeight: false,
change:
function(event, ui){
ui.newHeader.parent().prependTo(this);
}
}).sortable({
axis: "y",
handle: "h3",
stop: function() {
stop = true;
}
});
});
However it doesn't seem to be working. The standard demo code works fine with my html:
$(function() {
$( "#ccaccordion" ).accordion();
});
Any ideas where I'm going wrong?
Thanks in advance!