How to add many divs in JS?

Hi! How to add many divs in JS and apply some method?
For example

$("div.class, div.class,div.class").removeClass("hide");
$(".div").each(function(index, div) {
    // do stuff 
}))

What you’re doing should work, see this example.

1 Like