1$(function() { 2 var win = $(window), 3 winW = win.width(); 4 menubtn = $('#menubtn'), 5 menuicon = $('#menubtn-icon'), 6 gnav = $('#gnav'), 7 gnavMainList = $('#gnav-main li'), 8 gnavbtns = $('#gnav a'); 9 10 var menuFlg = 0; 11 12 win.on('load', function() { 13 menuClose(); 14 $('#gallery').css({ 15 'width': winW, 16 'opacity': 0, 17 'left': winW 18 }); 19 20 21 menubtn.on('click', function(){ 22 if(menuFlg) { 23 menuClose(); 24 } else { 25 menuOpen(); 26 } 27 }); 28 gnavbtns.on('click', function(){ 29 menuClose(); 30 }); 31 $('#gallery-close').on('click', function(){ 32 TweenMax.to('#gallery', 0.6, { 33 opacity: 0, 34 left: winW/2, 35 ease: Power3.easeIn, 36 onComplete: compFunc 37 }); 38 function compFunc(){ 39 TweenMax.set('#gallery', { 40 left: winW 41 }); 42 }; 43 44 }); 45 46 }); 47 48 function menuOpen() { 49 gnav.stop(true).fadeIn(400, function() { 50 for(var i=0;i<gnavMainList.length;i++) { 51 gnavMainList.eq(i).delay(i*120).animate({ 52 'opacity': 1, 53 'marginLeft': 0 54 }, 400, 'easeOutCubic'); 55 } 56 }); 57 menubtn.addClass('is-opened'); 58 menuicon.css({ 59 'backgroundPosition': 'left bottom' 60 }); 61 menuFlg = true; 62 } 63 function menuClose() { 64 gnav.stop(true).fadeOut(400); 65 for(var i=0;i<gnavMainList.length;i++) { 66 gnavMainList.eq(i).animate({ 67 'opacity': 0, 68 'marginLeft': 30 69 }, 100, 'linear'); 70 } 71 menubtn.removeClass('is-opened'); 72 menuicon.css({ 73 'backgroundPosition': 'left top' 74 }); 75 menuFlg = false; 76 } 77 78 79 win.on('resize', function() { 80 winW = win.width(); 81 $('#gallery .slider-photos').css({ 82 width: winW 83 }); 84 }); 85 86 win.on('scroll', function() { 87 88 }); 89 90 91});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.