Skip to content

Instantly share code, notes, and snippets.

@sofish
Created September 19, 2010 03:35
Show Gist options
  • Save sofish/586343 to your computer and use it in GitHub Desktop.
Save sofish/586343 to your computer and use it in GitHub Desktop.
// header collapse
var header = $('h3', '.hv-sqs');
header.each(function(i){
var t = $(this), ul = t.next('.hv-list-c'), bg = t.css('background-image');
t.toggle(function(){
ul.slideUp('fast',function(){
t.addClass('hv-header-up').css('background-image','none');
});
if(i==0) $('.hv-slist-s','#hv-allq').hide();
},function(){
ul.slideDown()
t.removeClass('hv-header-up').css('background-image', bg);
if(i==0) $('.hv-slist-s','#hv-allq').show();
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment