javascript - How to append css Class name to particular image src url -
i have images in blogspot.com, , want append class name via javascript under particular div.
for instance :-
<div class="outer-post"> <img src="http://1.bp.blogspot.com/1.jpg" width="200" height="200" /> <!-- more images --> <img src="http://1.bp.blogspot.com/100.jpg" width="200" height="200" /> </div>
and want convert :-
<div class="outer-post"> <img src="http://1.bp.blogspot.com/1.jpg" class="mypic" width="200" height="200" /> <!-- more images --> <img src="http://1.bp.blogspot.com/100.jpg" class="mypic" width="200" height="200" /> </div>
is possible?
using jquery $("div.outer-post img").addclass("mypic")
Comments
Post a Comment