Skip to content

Instantly share code, notes, and snippets.

@arbo77
Created October 11, 2013 13:43
Show Gist options
  • Save arbo77/6934892 to your computer and use it in GitHub Desktop.
Save arbo77/6934892 to your computer and use it in GitHub Desktop.
jQuery Roller Up Plugin
(function($){
$.fn.rollerUp = function() {
var el = $(this)[0];
var ch = $(el).children()[0];
$(ch).animate({height:'0px', opacity: 0},500,function(){
$(this).remove();
setTimeout(function(){
$(ch).attr("style","");
$(el).append(ch);
$(el).rollerUp();
},3000);
});
};
})( jQuery )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment