My problem is quite simple.
In my php page I generate as many divs as necessary through a “while” statement
Each div has got an ID which changes this way: id='ref".$i"' (Every time the While statement starts again to proceed, $i increases by 1, I mean $i++
Now I need to select all these divs in my JQUERY file
My problem is quite simple. In my php page I generate as many divs
Share
Use the “starts with” ^= selector wildcard
Once you have this Collection, if you want each value you can just loop through them with jQuery’s
.each():