OK I have a script that works fine but I want the script to work on a number of similar elements on the same page. The elements are divs with IDs of ‘container1’, ‘container2’, ‘container3’ etc etc
So in the script is this line:
[code=html]document.getElementById(container[n]);
so it needs to be able to identify each container and their only difference is the last digit.
I’m pretty poor at writing new Javascript and don’t know it very well but I thought it could be done using regular expressions? I’ve learnt this area of js, but not too well coz I can’t get it to work. Which is annoying as hell coz I know this is soooooooooooo easy. π‘
Help please ?