I need to have a data attribute added to every image on a page. This data images provides a lightbox functionality but since there so many images it would be nice to automate this by using Jquery.
So far I've played with the data attribute possibilities like:
$('.item a).attr('data-lightbox');
I have multiple images on a pages and all with the .item div should have the data attribute applied to. Am I thinking the right way?