Advertisement
soyuka

Untitled

Jun 5th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* JQuery adds */
  2. jQuery(document).ready(function($) {
  3.     var slideToNext = function() {
  4.         var $active = $('.nav_control.select')
  5.         if(!$active.is(':last-child')) {
  6.             $active.next('.nav_control').click();
  7.         } else {
  8.             $active.parent().find('.nav_control:first-child').click();
  9.         }
  10.     };
  11.  
  12.     var slideInterval = setInterval(slideToNext, 4500);
  13.  
  14.     $('#wrap').on({
  15.         mouseenter: function() {
  16.             clearInterval(slideInterval);
  17.         },
  18.         mouseleave: function() {
  19.             setInterval(slideToNext, 4500);
  20.         }
  21.     })
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement