1//ãåèï¼http://sterfield.co.jp/designer/ãã¼ã¸ãªã³ã¯ä»ãã®ã¢ã³ã«ã¼ãªã³ã¯ã«å¯¾å¿ããjquery/ 2$(window).load(function(){ 3//$(function(){ 4 //.noScrollã¯é¤å¤ 5 $('a[href*=#], area[href*=#]').not(".noScroll,.XXXX").click(function() { 6 7 var speed = 400, // ããªç§(ãã®å¤ãå¤ããã¨ã¹ãã¼ããå¤ãã) 8 href = $(this).prop("href"), //ãªã³ã¯å ã絶対ãã¹ã¨ãã¦åå¾ 9 hrefPageUrl = href.split("#")[0], //ãªã³ã¯å ã絶対ãã¹ã«ã¤ãã¦ã#ããåã®URLãåå¾ 10 currentUrl = location.href, //ç¾å¨ã®ãã¼ã¸ã®çµ¶å¯¾ãã¹ãåå¾ 11 currentUrl = currentUrl.split("#")[0]; //ç¾å¨ã®ãã¼ã¸ã®çµ¶å¯¾ãã¹ã«ã¤ãã¦ã#ããåã®URLãåå¾ 12 13 //#ããåã®çµ¶å¯¾ãã¹ãããªã³ã¯å ã¨ç¾å¨ã®ãã¼ã¸ã§åãã ã£ããã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ãå®è¡ 14 if(hrefPageUrl == currentUrl){ 15 16 //ãªã³ã¯å ã®#ãããã¨ã®å¤ãåå¾ 17 href = href.split("#"); 18 href = href.pop(); 19 href = "#" + href; 20 21 //ã¹ã ã¼ã¹ã¯ãã¼ã«ã®å®è£ 22 var target = $(href == "#" || href == "" ? 'html,body' : href), 23 position = target.offset().top //targetã®ä½ç½®ãåå¾ 24// body = 'body', 25// userAgent = window.navigator.userAgent.toLowerCase(); 26// if (userAgent.indexOf('msie') > -1 || userAgent.indexOf('trident') > -1 || userAgent.indexOf("firefox") > -1 ) { /*IE8.9.10.11*/ 27// body = 'html'; 28// } 29 $('html,body').animate({ 30 scrollTop: position 31 }, speed, 'swing', function() { 32 //ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ãè¡ã£ããã¨ã«ãã¢ãã¬ã¹ã夿´(ã¢ãã¬ã¹ãå¤ããããªãå ´åã¯ãããåé¤) 33 if(href != "#top" && href !="#") { 34 location.href = href; 35 } 36 }); 37 38 return false; 39 } 40 41 }); 42});
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.