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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -