I made an update to someone's coding at How to maximize and minimize a div.
I wanted to see if I can populate various listings below each other and depending on which one selected, it will maximize or minimize.
However, when testing this, only the first one will work. Any reason this is so?
https://jsfiddle.net/Qy6Sj/1887/
Coding:
$("#max_min_button").click(function(){
if($(this).html() == "-"){
$(this).html("+");
}
else{
$(this).html("-");
}
$("#news_body").slideToggle();
});
I have tested some of the coding found at minimize maximize the div ? javascript or jquery which works for all the div but it wasn't working.
I tried this code example at http://wpapi.com/minimize-restore-maximize-hide-functionality-javascript-jquery/ but it didn't work either.