SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .blink {
  2.  
  3.     -webkit-animation: blink .75s linear infinite;
  4.     -moz-animation: blink .75s linear infinite;
  5.     -ms-animation: blink .75s linear infinite;
  6.     -o-animation: blink .75s linear infinite;
  7.      animation: blink .75s linear infinite;
  8. }
  9.  
  10. @keyframes blink {
  11.     0%{transition-duration: 0.4s;}
  12. 50%{transform:scale(1.6);}
  13. 0%{-webkit-transition-duration: 0.4s;}
  14. 50%{-webkit-transform:scale(1.5);}
  15. }
  16.      
  17. <div class="progressive-elems">
  18.             <ul id="mylist">
  19.               <li  class="elem1" >progressive</li>
  20.               <li class="elem2">Safe</li>
  21.               <li class="elem3">Connectivity</li>
  22.               <li class="elem10">Independent</li>
  23.               <li class="elem4">Re-</li>
  24.               <li class="elem11">Engagable</li>
  25.               <li class="elem5">Discoverable</li>
  26.               <li class="elem6">Link</li>
  27.               <li class="elem7">Refreh</li>
  28.               <li class="elem8">Responisve</li>
  29.               <li class="elem9">APP-LIKE</li>
  30.             </ul>
  31.           </div>
  32.      
  33. $(document).ready(function() {
  34.  
  35.   var $liCollection = $(".progressive-elems li");
  36.  
  37.   var $firstListItem = $liCollection.first();
  38.   console.log($firstListItem);
  39.  
  40.   $liCollection.first().addClass("blink ".$firstListItem );
  41.  
  42.   setInterval(function() {
  43.  
  44.       var $activeListItem = $(".blink ".$firstListItem);
  45.  
  46.       $activeListItem.removeClass("blink ".$firstListItem);
  47.  
  48.       var $nextListItem = $activeListItem.closest('li').next();
  49.  
  50.       if ($nextListItem.length == 0) {
  51.           $nextListItem = $firstListItem;
  52.       }
  53.  
  54.       $nextListItem.addClass("blink ".$firstListItem);
  55.   }, 500);
  56. });​
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top