Signin  Pricing  Examples  Support

Libraries > accordionmenu.js

accordionmenu.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://ianimate.net/templates/yoo_cloud/warp/js/accordionmenu.js


Libraries on ianimate.net


caption.js

core.js

mootools-core.js

jquery.js

template.js

accordionmenu.js

dropdownmenu.js

warp.js



Explore More


jquery.noconflict.js

ccard.js

ds-sleight.js

cookies.js

accordionmenu.js
				
/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */

(function(d){var a=function(){};d.extend(a.prototype,{name:"accordionMenu",options:{mode:"default",display:null,collapseall:false,toggler:"span.level1.parent",content:"ul.level2"},initialize:function(a,b){var b=d.extend({},this.options,b),c=a.find(b.toggler);c.each(function(h){var a=d(this),c=a.next(b.content).wrap("<div>").parent();c.data("height",c.height());a.hasClass("active")||h==b.display?c.show():c.hide().css("height",0);a.bind("click",function(){f(h)})});var f=function(a){var a=d(c.get(a)),
e=d([]);a.hasClass("active")&&(e=a,a=d([]));b.collapseall&&(e=c.filter(".active"));switch(b.mode){case "slide":a.next().stop().show().animate({height:a.next().data("height")});e.next().stop().animate({height:0},function(){e.next().hide()});break;default:a.next().show().css("height",a.next().data("height")),e.next().hide().css("height",0)}a.addClass("active").parent().addClass("active");e.removeClass("active").parent().removeClass("active")}}});d.fn[a.prototype.name]=function(){var g=arguments,b=g[0]?
g[0]:null;return this.each(function(){var c=d(this);if(a.prototype[b]&&c.data(a.prototype.name)&&b!="initialize")c.data(a.prototype.name)[b].apply(c.data(a.prototype.name),Array.prototype.slice.call(g,1));else if(!b||d.isPlainObject(b)){var f=new a;a.prototype.initialize&&f.initialize.apply(f,d.merge([c],g));c.data(a.prototype.name,f)}else d.error("Method "+b+" does not exist on jQuery."+a.name)})}})(jQuery);


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z