EduardET

Sound Bar

Jan 16th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. <script>
  3. ( function( $ ) {
  4.     $( document ).ready( function() {
  5.         if ( $( '.ds-soundbar' ).length ) {
  6.             setInterval( function() {
  7.                 $( ".ds-soundbar .ds-bar-tall, .ds-soundbar .ds-bar-short" ).each( function() {
  8.                     $( this ).css( {
  9.                         "top": getRandomArbitrary( 0, 200 ) + "px"
  10.                     } );
  11.                 } );
  12.             }, 100 );
  13.         }
  14.     } );
  15.  
  16.     function getRandomArbitrary( min, max ) {
  17.         return Math.random() * ( max - min ) + min;
  18.     }
  19. } )( jQuery );
  20. </script>
Advertisement
Add Comment
Please, Sign In to add comment