Guest User

Untitled

a guest
Jan 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. //Fade in and out animation on hove buttons - meteo, and slide pagination balls
  2. $(window).load(function() {
  3. $("ul.slidebtns li a").hover(function() {
  4. divW = ($(this).next("div").width() / 2) - ($(this).outerWidth() / 2);
  5. $(this).next("div").css({marginLeft: -divW }).animate({ opacity: "show" }, "fast");
  6. }, function() {
  7. $(this).next("div").animate({opacity: "hide"}, "fast");
  8. });
  9.  
  10. $("#tempicon img").hover(function() {
  11. var $img = $(this);
  12. var $labelDiv = $img.next("div");
  13.  
  14. var halfOfLabelDivsWidth = $labelDiv.width() / 2;
  15. var imgMiddle = $img.position().left + ($img.width() / 2);
  16.  
  17. $labelDiv
  18. .css({
  19. left: imgMiddle - halfOfLabelDivsWidth
  20. })
  21. .animate({ opacity: "show" }, "fast");
  22. }, function() {
  23. $(this).next("div").animate({opacity: "hide"}, "fast");
  24. });
  25. });
  26.  
  27. $(window).load(function() {
  28. jQuery(window).load(function() {
  29.  
  30. $("ul.slidebtns li a").hover(function() {
  31. jQuery("ul.slidebtns li a").hover(function() {
  32.  
  33. (function ($) {
  34. ...all your code here...
  35. }(jQuery));
  36.  
  37. jQuery(document).ready(function ($) {
  38. ...code...
  39. });
  40.  
  41. jQuery(function ($) {
  42. ...code...
  43. });
Add Comment
Please, Sign In to add comment