Template:Team:Leeds Vallenatojs
From 2013.igem.org
(Difference between revisions)
(js jquery program for web elements, originally from switchroyale) |
m |
||
Line 8: | Line 8: | ||
*/ | */ | ||
- | $(document).ready(function() | + | $(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}) |
- | { | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | }) | + |
Revision as of 15:02, 2 September 2013
/*!
* Vallenato 1.0 * A Simple JQuery Accordion * * Designed by Switchroyale * * Use Vallenato for whatever you want, enjoy! */
$(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})