//
function init(){
$('.sqs-block-markdown').nextUntil('.sqs-block-markdown, .sqs-block-code').slideUp(); //Your code (wrapped in a function)
$('.sqs-block-markdown').unbind().click(function(){
$('.sqs-block-markdown').not(this).nextUntil('.sqs-block-markdown, .sqs-block-code').slideUp(),
$('.sqs-block-markdown').not(this).removeClass('activedrop'),
$(this).nextUntil('.sqs-block-markdown, .sqs-block-code').slideToggle();
$(this).toggleClass('activedrop')
});
$('.sqs-block-markdown').css('cursor','pointer');;
}
document.addEventListener('pageChange', function(){ //When the change page event fires due to ajax
init(); //Call the code again
});
/*This stuff listens for an ajax page change*/
window.onload = watch;
function watch(){MutationObserver=window.MutationObserver||window.WebKitMutationObserver;var a=new MutationObserver(function(a){for(var b=0;b