1/******************************************************************************** 2 3 SYNCER ã ç¥èãæåãã¿ããªã¨åæ(Sync)ããããã° 4 5 * é å¸å ´æ 6 https://syncer.jp/jquery-modal-window 7 8 * æçµæ´æ°æ¥æ 9 2015/08/17 15:55 10 11 * ä½è 12 ããã 13 14 ** é£çµ¡å 15 Twitter: https://twitter.com/arayutw 16 Facebook: https://www.facebook.com/arayutw 17 Google+: https://plus.google.com/114918692417332410369/ 18 E-mail: [email protected] 19 20 â» ãã°ãä¸å ·åã®å ±åãææ¡ããè¦æãªã©ããå¾ ã¡ãã¦ããã¾ãã 21 â» ç³ã訳ããã¾ãããããå©ç¨è æ§ãåã ã®ç°å¢ã«ãããåé¡ã¯ãµãã¼ããã¦ãã¾ããã 22 23********************************************************************************/ 24 25 26$(function(){ 27 28//ã¢ã¼ãã«ã¦ã£ã³ãã¦ãåºç¾ãããã¯ãªãã¯ã¤ãã³ã 29$("#modal-open").click( function(){ 30 31 //ãã¼ãã¼ãæä½ãªã©ã«ããããªã¼ãã¼ã¬ã¤ãå¤éèµ·åããã®ã鲿¢ãã 32 $( this ).blur() ; //ãã¿ã³ãããã©ã¼ã«ã¹ãå¤ã 33 if( $( "#modal-overlay" )[0] ) return false ; //æ°ããã¢ã¼ãã«ã¦ã£ã³ãã¦ãèµ·åããªã (鲿¢ç1) 34 //if($("#modal-overlay")[0]) $("#modal-overlay").remove() ; //ç¾å¨ã®ã¢ã¼ãã«ã¦ã£ã³ãã¦ãåé¤ãã¦æ°ããèµ·åãã (鲿¢ç2) 35 36 //ãªã¼ãã¼ã¬ã¤ãåºç¾ããã 37 $( "body" ).append( '<div id="modal-overlay"></div>' ) ; 38 $( "#modal-overlay" ).fadeIn( "slow" ) ; 39 40 //ã³ã³ãã³ããã»ã³ã¿ãªã³ã°ãã 41 centeringModalSyncer() ; 42 43 //ã³ã³ãã³ãããã§ã¼ãã¤ã³ãã 44 $( "#modal-content" ).fadeIn( "slow" ) ; 45 46 //[#modal-overlay]ãã¾ãã¯[#modal-close]ãã¯ãªãã¯ããã⦠47 $( "#modal-overlay,#modal-close" ).unbind().click( function(){ 48 49 //[#modal-content]ã¨[#modal-overlay]ããã§ã¼ãã¢ã¦ãããå¾ã«â¦ 50 $( "#modal-content,#modal-overlay" ).fadeOut( "slow" , function(){ 51 52 //[#modal-overlay]ãåé¤ãã
53 $('#modal-overlay').remove() ; 54 55 } ) ; 56 57 } ) ; 58 59} ) ; 60 61//ãªãµã¤ãºãããããã»ã³ã¿ãªã³ã°ããã颿°[centeringModalSyncer()]ãå®è¡ãã 62$( window ).resize( centeringModalSyncer ) ; 63 64 //ã»ã³ã¿ãªã³ã°ãå®è¡ãã颿° 65 function centeringModalSyncer() { 66 67 //ç»é¢(ã¦ã£ã³ãã¦)ã®å¹ ãé«ããåå¾ 68 var w = $( window ).width() ; 69 var h = $( window ).height() ; 70 71 // ã³ã³ãã³ã(#modal-content)ã®å¹ ãé«ããåå¾ 72 // jQueryã®ãã¼ã¸ã§ã³ã«ãã£ã¦ã¯ã弿°[{margin:true}]ãæå®ããæãä¸å ·åãèµ·ããã¾ãã 73// var cw = $( "#modal-content" ).outerWidth( {margin:true} ); 74// var ch = $( "#modal-content" ).outerHeight( {margin:true} ); 75 var cw = $( "#modal-content" ).outerWidth(); 76 var ch = $( "#modal-content" ).outerHeight(); 77 78 //ã»ã³ã¿ãªã³ã°ãå®è¡ãã 79 $( "#modal-content" ).css( {"left": ((w - cw)/2) + "px","top": ((h - ch)/2) + "px"} ) ; 80 81 } 82 83} ) ;
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.