I have searched the forums pretty extensively to see if this question was answered before and haven’t seen that it was.
I am trying to implement the jQuery accordion effect more than once within the same HTML page. I included the plugins and their following suggested code:
$(function() {
$("#accordion").accordion();
});
and it does work just fine on the DIV with an id of “accordion” but when I change it to
$(function() {
$(".accordion").accordion();
});
and give all the DIVs that need to act as accordions a class of “accordion” then it only works on the first such DIV in the code. For example, if I move the fifth such DIV to the first position then that becomes the only working one.
Is there any way I can make it so that they all work?