/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//Set the fadeToggle function $.fn.fadeToggle = function(speed) { return this.animate({opacity: 'toggle'}, speed); }; //Execute the plugin $('div#workContent').hide(); $("a.allContent").click(function(){ $("div#workContent").fadeToggle(150); $(this).toggleClass("active"); return false; }); $("a.closecontent").click(function () { $("div#workContent").fadeToggle(150); return false; });