Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. $('.' + container).hover(function() {
  2. t = setTimeout( function(elem){
  3. //this should be executed as long as I hover,
  4. //with interval declared in viewSpped variable
  5. $(elem).find('img').first().appendTo('.' + container).fadeOut(500);
  6. $(elem).find('img').first().fadeIn(800);
  7.  
  8. }(this), viewSpeed);
  9.  
  10.  
  11. }...
  12.  
  13. t = setInterval( function(elem){
  14. //this should be executed as long as I hover,
  15. //with interval declared in viewSpped variable
  16. $(elem).find('img').first().appendTo('.' + container).fadeOut(500);
  17. $(elem).find('img').first().fadeIn(800);
  18. }, viewSpeed, this);
  19.  
  20. var $elem = $(this);
  21. t = setInterval( function(){
  22.         $elem.find('img').first().appendTo('.' + container).fadeOut(500);
  23.         $elem.find('img').first().fadeIn(800);    
  24. }, viewSpeed);
  25.  
  26. $('.' + container).hover(function() {
  27. var self = $(this);
  28. t = setTimeout( function(){
  29. //this should be executed as long as I hover,
  30. //with interval declared in viewSpped variable
  31. self.find('img').first().appendTo('.' + container).fadeOut(500);
  32. self.find('img').first().fadeIn(800);
  33.  
  34. }, viewSpeed);
  35. }...
  36.  
  37. var elem = $(this);
  38. var container = $('.' + container);
  39.  
  40. t = setInterval(function() {
  41. elem.find('img').first().appendTo(container).fadeOut(500);
  42. elem.find('img').first().fadeIn(800);
  43. }, viewSpeed);
Add Comment
Please, Sign In to add comment