Using jQuery with JSF auto-generated ids (issue with ":") -
i read post handling colon in element id in css selector outlines how select known id contains colon.
what create jsf list contains images. using jquery select each image , read in id. possible without writing code replace colons?
use jquery iterate on each individual img element. assuming ul
element has id wx:yz
:
// use jquery select images within var imgs = $('#wx\\:yz img'); // iterate on each 1 , give image id library // if image has id. imgs.each(function() { if(this.id && this.id.length) { nameofyourlibraryfunction(this.id); } });
Comments
Post a Comment