Skip to content

Instantly share code, notes, and snippets.

@vincentdeelen
Created December 12, 2013 15:32
Show Gist options
  • Save vincentdeelen/7929824 to your computer and use it in GitHub Desktop.
Save vincentdeelen/7929824 to your computer and use it in GitHub Desktop.
Script to create accordion effect on navigation list
$('#uRightCol aside').accordion(
{ header: "h1"
, icons : null
, active: false
, collapsible: true
, create: function(event, ui){
$('#uRightCol aside').each(function(){
var activeList = $('.tsLiActive').parent().parent().attr('ID')
activeList = activeList.charAt(activeList.length-1)
if ( $.isNumeric(activeList) ){
activeList = parseInt(activeList)
}
$(this).accordion("option", "active", activeList)
$(this).draggable()
})
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment