Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mouseX;
- $("#panel2").delay(200).mouseenter(function(e) {
- if($(window).width()>992) {
- mouseX = e.pageX;
- mouseX = mouseX*1.4;
- $("#panel2 .top").animate({width:mouseX},200,'linear');
- $("#panel2 .divider").animate({left:mouseX-$("#panel2").width()/4.39},200,'linear', function() {
- $("#panel2").bind("mousemove", function(e) {
- if($(window).width()>992 && !$("#panel2 .top").is(':animated')) {
- mouseX = e.pageX;
- mouseX = mouseX*1.4;
- $("#panel2 .top").css("width",mouseX);
- $("#panel2 .divider").css("left",mouseX-$("#panel2").width()/4.39);
- }
- });
- });
- }
- });
- $("#panel2").mouseleave( function(e) {
- if($(window).width()>992) {
- $("#panel2 .top").animate({width:'72vw'},500,'easeInOutCubic');
- $("#panel2 .divider").animate({left:'49.4vw'},500,'easeInOutCubic');
- }
- $("#panel2").unbind("mousemove");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement