Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. var changePic = function(evt){
  2. //alert("hi");
  3. var a = $(this);
  4. var title = $(this).attr("title");
  5. //alert("hi");
  6. var imageHref = a.attr("src");
  7. $("#enlarged").attr("src", imageHref);
  8. $("#imgtitle").text(title);
  9. var asideTag = $("#image");
  10. asideTag.attr("src",imageHref );
  11. //evt.preventDefault();
  12. };
  13.  
  14.  
  15. $(document).ready(function() {
  16. $(".bxslider").bxSlider({
  17. //auto: true,
  18. //autoControls: true,
  19. //stopAutoOnClick: true,
  20. //pager: true,
  21. mode: 'fade',
  22. captions: true,
  23. slideWidth: 400
  24. });
  25. var imgElements = $(".bxslider img");
  26. //alert(imgElements[2]);
  27. /*imgElements.each(function() {
  28. var image = new Image();
  29. image.src = $(this).attr("href");
  30. });*/
  31.  
  32. imgElements.mouseenter(changePic);
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement