Skip to content

Instantly share code, notes, and snippets.

@arashi01
Created October 28, 2012 23:47
Show Gist options
  • Save arashi01/3970490 to your computer and use it in GitHub Desktop.
Save arashi01/3970490 to your computer and use it in GitHub Desktop.
<a href="#" class="showhide" source="one"> Thing </a>
<div id="one">aaa</div>
<a href="#" class="showhide" source="two"> Other Thing</a>
<div id="two">bbbb</div>
jQuery('.showhide').live( 'click' , function () {
$(this).next().slideToggle( 'slow',function(){
$(this).prev().text(function(){
if ($(this).next().is(":visible")) return "Hide";
else return "Show";
});
} );
return false;
}).next().hide();
(function (a) {
a(function () {
a(".toggle-nav").live("click", function (b) {
var c = a(b.currentTarget);
c.hasClass("open") ? (c.removeClass("open"), a("#megaDrop").slideUp(400)) : (c.addClass("open"), a("#megaDrop").slideDown(400))
})
})
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment