" ); $( "#search-container" ).wrap( "" ); // Get the header var header = document.getElementById("sticky-container"); // Get the offset position of the navbar if(noMobile) { try{ var banner = document.getElementById("sticky-banner-container"); var sticky = banner.offsetTop; } catch(err){ //do nothing } }else{ try{ var sticky = header.offsetTop; } catch(err){ //do nothing } } } // Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position function makeHeaderSticky() { stickyStopperPosition = $(".nascar-footer").offset().top, stopPoint = stickyStopperPosition - rightRailHeight - 40, diff = stopPoint + 40; if (stopPoint sticky) { // header.classList.add("sticky"); if(noMobile) { banner.classList.add("sticky"); if (rightRail){ sideBar.classList.add("sticky"); $(sideBar).css({ 'position': '', 'top': '' }); } if(!jQuery("#sticky-container").hasClass("dontStick")){ jQuery(".footer-banner .gallery-ad-close-container").fadeIn(); } } } else { header.classList.remove("sticky"); jQuery(".footer-banner .gallery-ad-close-container").fadeOut(); if(noMobile) { banner.classList.remove("sticky"); if (rightRail){ sideBar.classList.remove("sticky"); } } } } $(window).scroll(function(){ $( ".search-filters li a" ).each(function( index ) { var menuSlug = $( this ).attr( "data-slug" ); var menuItem = document.getElementById(menuSlug); if(menuItem){ // check if anchor id exists //console.log("menuItem", menuItem); if (isInViewport(menuItem)) { //console.log("isInViewport", menuSlug); $(".search-filters li .search-selected").removeClass('search-selected'); $(".search-filters li a[data-slug*='"+menuSlug+"']").addClass('search-selected'); } } }); if( nav ){ makeHeaderSticky(); } }); //on click gallery menu Dropdown var firstClick = true; $( "button.dropbtn" ).on( "click", function(e) { if(jQuery(window).width()
The Link LonkBy @nascarcasm | Wednesday, January 27, 2021
Presented By:
January 27, 2021 at 09:50PM
https://ift.tt/3cgkSjc
@nascarcasm: How Chase Elliott prepares for the Rolex 24 - NASCAR
https://ift.tt/3gaCH26
Rolex
No comments:
Post a Comment