I'm trying to find all the images on a page based on their alignment (no class or id attached to these images), although I'm not sure how to do it. Basically I want to add CSS to images which are aligned to the right, yet leave th开发者_开发问答e other images as they are.
If anyone could help out, that'd be great :)
What about img[align="top"] ?
http://api.jquery.com/attribute-equals-selector/
Have you tried this selector?
$('img[align=right]').addClass('onRight');
or if that doesn't work, it might help if you showed us some of your HTML
精彩评论