Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="image-1">
- <img src="large1.jpg">
- </div>
- <div id="thumbs">
- <a id="thumb_1" href="large1.jpg" title="1"><img src="small1.jpg" alt="image 1"/></a>
- <a id="thumb_2" href="large2.jpg" title="2"><img src="small2.jpg" alt="image 1"/></a>
- <a id="thumb_3" href="large3.jpg" title="3"><img src="small3.jpg" alt="image 1"/></a>
- </div>
- ...
- <div class="image-2">
- <img src="large2.jpg">
- </div>
- <div id="thumbs">
- <a id="thumb_1" href="another_large1.jpg" title="1"><img src="anout_small1.jpg" alt="image 1"/></a>
- <a id="thumb_2" href="another_large2.jpg" title="2"><img src="another_small2.jpg" alt="image 1"/></a>
- <a id="thumb_3" href="another_large3.jpg" title="3"><img src="another_small3.jpg" alt="image 1"/></a>
- </div>
- ...
- $(function() {
- $(".mouseover a").mouseover(function(){
- var src=$(this).attr('href');
- var classs=$(this).attr('class');
- classs=classs.substr(6);
- $('.'+classs).find('img').attr('src',src);
- })
- })
Add Comment
Please, Sign In to add comment