Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2013
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.                            
  3.       $('.dial').knob({
  4.         'min':0,
  5.         'max':100,  
  6.         'readOnly': true,
  7.         'width': 120,
  8.         'height': 120,
  9.         'fgColor': '#b9e672',
  10.         'dynamicDraw': true,
  11.         'thickness': 0.3,
  12.         'tickColorizeValues': true,
  13.         'skin':'tron'
  14.       });
  15.      
  16.       $(window).scroll(function(){
  17.           var top = $(document).scrollTop();
  18.           if (top > 300) {
  19.               if($('.dial').val() == 0)
  20.               {
  21.                   $({value: 0}).animate({value: $('.dial').attr("rel")}, {
  22.                   duration: 2000,
  23.                   easing:'swing',
  24.                   step: function()
  25.                   {
  26.                     $('.dial').val(Math.ceil(this.value)).trigger('change');
  27.                   }
  28.                   })
  29.             }
  30.       }
  31.     });
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement