Template:Team:Leeds Vallenatojs
From 2013.igem.org
(Difference between revisions)
m |
m (Instructions on use) |
||
(One intermediate revision not shown) | |||
Line 6: | Line 6: | ||
* | * | ||
* Use Vallenato for whatever you want, enjoy! | * Use Vallenato for whatever you want, enjoy! | ||
+ | * | ||
+ | * To use within wiki, paste in the following url as the src: | ||
+ | * https://2013.igem.org/Template:Team:Leeds_Vallenatojs?action=raw&ctype=text/javascript | ||
*/ | */ | ||
$(document).ready(function(){$(".accordion-header").toggleClass("inactive-header");var e=$(".accordion-header").width();$(".accordion-content").css({width:e});$(".accordion-header").click(function(){if($(this).is(".inactive-header")){$(".active-header").toggleClass("active-header").toggleClass("inactive-header").next().slideToggle().toggleClass("open-content");$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}else{$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}});return false}) | $(document).ready(function(){$(".accordion-header").toggleClass("inactive-header");var e=$(".accordion-header").width();$(".accordion-content").css({width:e});$(".accordion-header").click(function(){if($(this).is(".inactive-header")){$(".active-header").toggleClass("active-header").toggleClass("inactive-header").next().slideToggle().toggleClass("open-content");$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}else{$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}});return false}) |
Latest revision as of 15:31, 2 September 2013
/*!
* Vallenato 1.0 * A Simple JQuery Accordion * * Designed by Switchroyale * * Use Vallenato for whatever you want, enjoy! * * To use within wiki, paste in the following url as the src: * https://2013.igem.org/Template:Team:Leeds_Vallenatojs?action=raw&ctype=text/javascript */
$(document).ready(function(){$(".accordion-header").toggleClass("inactive-header");var e=$(".accordion-header").width();$(".accordion-content").css({width:e});$(".accordion-header").click(function(){if($(this).is(".inactive-header")){$(".active-header").toggleClass("active-header").toggleClass("inactive-header").next().slideToggle().toggleClass("open-content");$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}else{$(this).toggleClass("active-header").toggleClass("inactive-header");$(this).next().slideToggle().toggleClass("open-content")}});return false})