1var HEADER_FIXED_MENU = function(){ 2 var $body = $('body'); 3 var $html = $('html'); 4 var fixed_class = 'new_fixed_header_active'; 5 var fixed_diable_class = 'new_fixed_header_disable'; 6 var fixed_menu_cutoff; 7 var fixed_menu_height; 8 var banner_height; 9 var $doz_header_wrap; 10 var $new_org_header; 11 var $new_fixed_header; 12 13 var init = function(){ 14 $body = $('body'); 15 $html = $('html'); 16 $doz_header_wrap = $('#doz_header_wrap'); 17 $new_org_header = $('#doz_header_wrap').find('._new_org_header'); 18 $new_fixed_header = $('#doz_header_wrap').find('._new_fixed_header'); 19 fixed_menu_cutoff = $new_org_header.height(); 20 fixed_menu_height = $new_fixed_header.height(); 21 22 setTimeout(function(){ 23 if($body.hasClass(fixed_diable_class)) 24 return; 25 if($html.scrollTop() >= fixed_menu_cutoff && !$("nav.top[data-no-scroll]").length){ 26 if(!$body.hasClass(fixed_class)){ 27 $body.addClass(fixed_class) 28 } 29 } 30 var fixed_position_top = (-1 * Math.ceil(fixed_menu_height)); 31 $('section._one_page_section > div.scroll_position').css({'top':fixed_position_top+'px'}); 32 },40); 33 34 35 36 $(window).scroll(function(e){ 37 if($body.hasClass(fixed_diable_class)) 38 return; 39 //if($("nav.top[data-no-scroll]").length)return; 40 banner_height = 0; 41 fixed_menu_cutoff = $new_org_header.height(); 42 if($body.find('.banner-container').length > 0){ 43 $.each($body.find('.banner-container'),function(){ 44 banner_height += $(this).height(); 45 }); 46 if(fixed_menu_cutoff+banner_height > fixed_menu_cutoff && banner_height != 0){ 47 fixed_menu_cutoff += banner_height 48 } 49 } 50 if(this.pageYOffset >= fixed_menu_cutoff && !$body.hasClass(fixed_class)){ 51 $body.addClass(fixed_class) 52 }else if(this.pageYOffset <= fixed_menu_cutoff && $body.hasClass(fixed_class)){ 53 $body.removeClass(fixed_class) 54 } 55 }); 56 }; 57 58 59 return{ 60 'init' : function(){ 61 init(); 62 } 63 } 64}();
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.