Search images by data attribute and return eq()
Hi, can anyone help me return the eq() of the image when I search the data-age attribute? For example the age 18 it would the eq() of 2?
- <div id="resutsBox">
- <img src="gerrard_1.jpg" data-age="21" width="40" height="40" />
- <img src="gerrard_2.jpg" data-age="43" width="40" height="40" />
- <img src="gerrard_3.jpg" data-age="18" width="40" height="40" />
- <img src="gerrard_4.jpg" data-age="54" width="40" height="40" />
- </div>
Thanks.