javascript - Refresh all elements that their ids are partly equal -


i have webpage contains while loop, have assign id each element inside while loop, here example:

< tagname id="show_div_1">< /tagname>

the "show_id_" static "1" dynamic comes loop , increase 2,3,4 ...etc.

anyone knows how select such elements using javascript or jquery?

or there alternative way so?

you can use jquery contains selector

like this

$('tagname[id*="show_div_"]').each(function() {     // ... }); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -