Template:Team:Leeds Vallenatojs

From 2013.igem.org

(Difference between revisions)
m
m
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
  */
  */
$(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})

Revision as of 15:30, 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
*/

$(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})