1 2 3$(function(){ 4 5 //ã¢ã¼ãã«ï¼æ±ç¨ï¼ 6 // ã.btn-modalããã¯ãªã㯠7 $('.btn-modal').on('click',function() { 8 $('.modal-area .btn-close').css('display','table'); 9 // ãªã¼ãã¼ã¬ã¤ç¨ã®è¦ç´ ã追å 10 $('body').append('<div class="modal-overlay"></div>'); 11 // ãªã¼ãã¼ã¬ã¤ããã§ã¼ãã¤ã³ 12 $('.modal-overlay').fadeIn('slow'); 13 $('.l-body').addClass('bg-modal'); 14 $('body').css('overflow','hidden'); 15 16 // ã¢ã¼ãã«ã³ã³ãã³ãã®IDãåå¾ 17 var modal = '#' + $(this).attr('data-target'); 18 19 // ã¢ã¼ãã«ã³ã³ãã³ãã®è¡¨ç¤ºä½ç½®ãè¨å® 20 modalResize(); 21 // ã¢ã¼ãã«ã³ã³ãã³ããã§ã¼ãã¤ã³ 22 $(modal).fadeIn('slow'); 23 $(modal).addClass('on'); 24 25 // ã.modal-overlayããããã¯ã.modal-closeããã¯ãªã㯠26 $('.modal-overlay,.modal-close').on('click',function() { 27 // ã¢ã¼ãã«ã³ã³ãã³ãã¨ãªã¼ãã¼ã¬ã¤ããã§ã¼ãã¢ã¦ã 28 $('.modal-overlay').fadeOut('slow'); 29 $(modal).removeClass('on'); 30 $('.l-body').removeClass('bg-modal'); 31 $('body').css('overflow','auto'); 32 $('.modal-overlay').remove(); 33 }); 34 35 // ãªãµã¤ãºããã表示ä½ç½®ãååå¾ 36 $(window).on('resize', function(){ 37 modalResize(); 38 }); 39 40 // ã¢ã¼ãã«ã³ã³ãã³ãã®è¡¨ç¤ºä½ç½®ãè¨å®ãã颿° 41 function modalResize(){ 42 // ã¦ã£ã³ãã¦ã®æ¨ªå¹ ãé«ããåå¾ 43 var w = $(window).width(); 44 var h = $(window).height(); 45 46 // ã¢ã¼ãã«ã³ã³ãã³ãã®è¡¨ç¤ºä½ç½®ãåå¾ 47 var x = (w - $(modal).outerWidth(true)) / 2; 48 var y = (h - $(modal).outerHeight(true)) / 2; 49 50 // ã¢ã¼ãã«ã³ã³ãã³ãã®è¡¨ç¤ºä½ç½®ãè¨å® 51 $(modal).css({'left': x + 'px','top': y + 'px'}); 52 } 53 }); 54 55}); 56 57 58
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.