I was creating an accordion but it doesn’t work well with the query part..what could be the possible cause of this?..
here’s the code in jquery part..
i just copied it from one of the tutorials available in the internet and tried it but it does not work..=(
jQuery(document).ready(function(){
$("#accordion > li").click(function(){
if(false == $(this).next().is(':visible')) {
$('#accordion > ul').slideUp(300);
}
$(this).next().slideToggle(300);
});
$('#accordion > ul:eq(0)').show();
});
I appreciate any help..thanks ahead!..=)
Why don’t you use some already working solutions, like jquery-ui? Here is link to documentation and examples: http://jqueryui.com/demos/accordion/ You should try it, works perfectly, code is simple, if you need unique style – just change css files.