Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 5th, 2012  |  syntax: None  |  size: 1.21 KB  |  views: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jQuery(document).ready(function($) {
  2.  
  3. //appending mousepointer
  4. $('.rsArrowLeft').appendTo('.left');
  5. $('.rsArrowRight').appendTo('.right');
  6.        
  7. // mousepointer fading
  8. $('.arrow_wrap').mousemove(function(){
  9. $('.rsArrowIcn').fadeIn(100,function(){
  10.         $('.rsArrowIcn').css({"display":"block"});
  11.         });
  12. });    
  13.        
  14. $('#case_menu,#logo,#gallery_topnav,#main').mouseenter(function(){
  15. $('.rsArrowIcn').fadeOut(100);
  16. });
  17.  
  18. $('#case_menu,#logo,#gallery_topnav,#main').mouseleave(function(){
  19. $('.rsArrowIcn').fadeIn(100);
  20. });
  21.        
  22.         // Set up a 30 Hz frame rate
  23.  
  24. relMouseX    = 0;
  25. relMouseY    = 0;
  26. relMouseX2    = 0;
  27. relMouseY2    = 0;
  28. var arrRight = $('.rsArrowRight .rsArrowIcn');
  29. var arrLeft = $('.rsArrowLeft .rsArrowIcn');
  30.   // get the stage offset
  31.   offset1 = $('.right').offset();
  32.   offset2 = $('.left').offset();
  33.  
  34. $(document).mousemove( function(e) {
  35.   mouseX = e.pageX -20;
  36.   mouseY = e.pageY -10;
  37.   relMouseX = mouseX - offset1.left;
  38.   relMouseY = mouseY - offset1.top;
  39.   relMouseX2 = mouseX - offset2.left;
  40.   relMouseY2 = mouseY - offset2.top;
  41.   arrRight.css('left', relMouseX);
  42.   arrRight.css('top', relMouseY);
  43.   arrLeft.css('left', relMouseX2);
  44.   arrLeft.css('top', relMouseY2);
  45. });
  46.  
  47. });
clone this paste RAW Paste Data