I am trying to change the id and name attributes on the page. The code I use is as follows:
var img = new RegExp( 'id*="launch_pad_image_slide_\d"', g ) ; $('.slider-data').each(function(){ $(this).find(img).attr( 'id', 'random stuff' ); });
The .find function is .find to take the entire id inside:
id="launch_pad_image_slide_2"
... but it does not work.
5 hours on this and burned out. Suggestions? Basically, every time a field is deleted, jQuery should scroll through them and assign id / name attributes correctly to avoid doubling.
Orangeman555
source share