How can I display multiple DIVs with same class and different IDs inline with jQuery? I.e. first I want to check if DIV exists in BODY and then show the next DIV after the current DIV.
A:
$('div.className').each(function(i,elem){
elem.style.display = 'inline';
});
Doesn't matter if the DIV with the class exist, the loop with exit if none matches.
o.k.w
2009-12-20 10:50:24
What's wrong with `$('div.className').css('display', 'inline');` ?
J-P
2009-12-20 11:31:54
@J-P: Nothing's wrong, in fact that's a better choice :)
o.k.w
2009-12-20 12:13:59