开发者

jquery find image based on "align"

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜