SHARE
TWEET

Untitled

a guest Aug 19th, 2019 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mouseX;
  2.  
  3. $("#panel2").delay(200).mouseenter(function(e) {
  4.     if($(window).width()>992) {
  5.         mouseX = e.pageX;
  6.         mouseX = mouseX*1.4;
  7.         $("#panel2 .top").animate({width:mouseX},200,'linear');
  8.         $("#panel2 .divider").animate({left:mouseX-$("#panel2").width()/4.39},200,'linear', function() {
  9.             $("#panel2").bind("mousemove", function(e) {
  10.                 if($(window).width()>992 && !$("#panel2 .top").is(':animated')) {
  11.                     mouseX = e.pageX;
  12.                     mouseX = mouseX*1.4;
  13.                     $("#panel2 .top").css("width",mouseX);
  14.                     $("#panel2 .divider").css("left",mouseX-$("#panel2").width()/4.39);
  15.                 }
  16.             });
  17.         });
  18.     }
  19. });
  20.      
  21. $("#panel2").mouseleave( function(e) {
  22.     if($(window).width()>992) {
  23.         $("#panel2 .top").animate({width:'72vw'},500,'easeInOutCubic');
  24.         $("#panel2 .divider").animate({left:'49.4vw'},500,'easeInOutCubic');
  25.     }
  26.      $("#panel2").unbind("mousemove");
  27. });
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