Created
May 26, 2012 21:39
-
-
Save plavet/2795425 to your computer and use it in GitHub Desktop.
Jquery - Simple Accordion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `armonika | |
$('.armonika').hide(); | |
$('.triger:first').addClass('active').next().show(); | |
$('.triger').click(function(e){ | |
if( $(this).next().is(':hidden') ) { | |
$('.triger').removeClass('active').next().slideUp(); | |
$(this).toggleClass('active').next().slideDown(); | |
} | |
else { | |
$(this).next().slideUp() | |
} | |
e.preventDefault();//funckija gornjih linkova ukinuta da bi mogla | |
}); //da se otvara na klik `armonika a ne strane | |
$('.menu-tribine-container ul.sub-menu li a').click(function(){ | |
//vracam ponovo funkciju linkova inace ni pod linkovi nece otvarati strane na klik | |
window.location=$(this).attr("href"); return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment