Change images in div having same class
Dear Sir
have black button (JPG or image format) which is used many times on website
(image name read.jpg)
I had embed this image in DIV class 'readme'
- <div class='readme'><img src="read.jpg" width="62" height="71" border=0></div>
which I want to change to
(Image name reade.jpg) which is also in (JPG or image format)
I have following link links that decides change if image
- <ul>
- <li><a class="language <?php echo ($language_name=='marathi')?'active':'';?>" href="#" id='marathi'>Marathi</a></li>
- <li><a class="language <?php echo ($language_name=='english')?'active':'';?>" href="#" id='english'>Englishi</a></li>
- </ul>
I am using following script to change image
- if (language=='marathi')
- {
- alert('changing image to read.jpg');
- $(".readmore").attr("src","read.jpg");
- }
- else
- { alert('changing image to reade.jpg')
- $(".readmore").attr("src","reade.jpg");
- }