Guest User

Untitled

a guest
Dec 14th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $('.thumb-container-xs').click(function() {
  2. ///alert("You have clicked!");
  3. var img = $(this).find('img');
  4. var img_src = img.attr('src');
  5. var img_title = img.attr('title');
  6. var img_alt = img.attr('alt');
  7.  
  8. $("#productImage0").attr({
  9. src: img_src + '?' + new Date().getTime(), //adding random number at the end of the src not working
  10. title: img_title,
  11. alt: img_alt
  12. });
  13. $("#productImage1").attr({
  14. src: img_src + '?' + new Date().getTime(), //adding random number at the end of the src not working
  15. title: img_title,
  16. alt: img_alt
  17. });
  18.  
  19. $("#productImage0").load(function(){console.log(0)});
  20. $("#productImage1").load(function(){console.log(1)});
  21.  
  22. });
Add Comment
Please, Sign In to add comment