I'm trying to be able to dynamically expand / collapse multiple divs with the same code....
it's controlled with the click of a span (toggle) and then i'm trying to get the next id(the div that would slide up and down)
$('span').toggle(
function() {
$('#albumholder').slideToggle(600);
$(this).html('-');},
function() {
$('#albumholder').slideToggle(600);
$(this).html('+');}
);
This code works to expand 1 div... but assume i have a divs
#downloadholderHow can i achieve the same effect with the same code? Thanks!
#linksholder
etc...
EDIT
It's worth noting that I need each div to toggle independently. If i click the plus button on the span that is affecting #albumholder, it should not expand #downloadholder or #linksholder