1var url = window.location.href; 2var filename_ex = url.match(".+/(.+?)([\?#;].*)?$")[1]; 3 4 5 6function ClickMoveHash(el) { 7 this.$el = el; 8 this.page_hash_array = url.split("#"); 9 this.handleEvents(); 10 11} 12 13ClickMoveHash.prototype.handleEvents = function() { 14 var self = this; 15 if(self.page_hash_array[1]){ 16 self.parentOpen($("#"+this.page_hash_array[1])); 17 18 self.delayFire($("#"+this.page_hash_array[1])); 19 } 20 //////////////// 21 //ã¯ãªãã¯ã§ã®ã ã¼ãã³ã° 22 self.$el.on("click",function(e) { 23 $("*").removeClass("navopend"); 24 $("body").addClass("navclose"); 25 attach_top = $("body").css("top"); 26 attach_top = attach_top.replace('px',''); 27 attach_top = attach_top*-1; 28 $("body").css({ 29 "top":0, 30 "position": "relative", 31 "overflow-y": "" 32 }); 33 if(attach_top!=0){ 34 $(window).scrollTop(attach_top); 35 } 36 37 38 var $target = $(e.currentTarget); 39 40 41 str_href=$target.attr("href"); 42 a_array = str_href.split("#"); 43 self.parentOpen($("#"+a_array[1])); 44 if(filename_ex==a_array[0]){ 45 self.ClickMoveHashAct(e); 46 return false; 47 } 48 else{ 49 self.ClickMoveHashAct(e); 50 return false; 51 } 52 53 54 }); 55}; 56ClickMoveHash.prototype.ClickMoveHashAct = function(e) { 57 var self = this; 58 var $target = $(e.currentTarget); 59 var href = "#"+a_array[1]; 60 if(a_array[1]!=""){ 61 self.moveHash($(href).offset().top); 62 } 63 64 //console.log($(href).offset().top); 65}; 66 67ClickMoveHash.prototype.delayFire = function(el) { 68 var self = this; 69 70 var cnt = 0; 71 setInterval(function(){ 72 cnt++; 73 if(cnt==1){ 74 hash_offset=el.offset().top - $('header').height(); 75 self.moveHash(hash_offset); 76 } 77 },1000); 78}; 79ClickMoveHash.prototype.parentOpen = function(el) { 80 var self = this; 81 if(el.parent().height()==0){ 82 el.parent().parent().children(".hav_cont").addClass("active"); 83 } 84}; 85ClickMoveHash.prototype.moveHash = function(offsetTop) { 86 //windowã®ãµã¤ãºã§ãããã¼é«ããè¨ç® 87 header_height = $("header").height(); 88 //header_height =0; 89 var position = offsetTop - header_height; 90 91 var speed = 1000; 92 $("html, body").animate( 93 {"scrollTop": position+1}, 94 { 95 duration: speed, 96 easing: 'swing', 97 complete: function() { 98 99 } 100 }); 101}; 102//////////////// 103//ããã·ã¥ãæã£ãã¢ã¯ã»ã¹ã§ã®ã ã¼ãã³ã° 104function LoadMoveHash(el) { 105 this.$el = el; 106 this.page_hash_array = url.split("#"); 107 this.handleEvents(); 108} 109 110LoadMoveHash.prototype.handleEvents = function() { 111 var self = this; 112 if(this.page_hash_array[1]){ 113 hash_offset=$("#"+this.page_hash_array[1]).offset().top - $('header').height(); 114 console.log(hash_offset); 115 console.log($('header').height()); 116 $("html, body").animate({scrollTop:hash_offset},"1"); 117 } 118}; 119 120 121 122 123 124$(window).bind('load', function() { 125 header_position=$('header').css('position'); 126 if(header_position=='fixed'){ 127 header_height = $('header').height(); 128 } 129 else{ 130 header_height=0; 131 } 132 header_height = $('header').height(); 133 var click_move_hash = new ClickMoveHash($('a[href*=#]')); 134 //var load_move_hash = new LoadMoveHash(); 135}); 136 137
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.