"); } else if ($("body").find(".body-container-wrapper .page-center")) { $("body").find(".body-container-wrapper .page-center:eq(0)").prepend("
"); } else { $("body").addClass("header--static"); } } $("body").find(".header--anchor").css({ "height":"0px" }); thisHeaderAnchor = $("body").find(".header--anchor:eq(0)"); thisHeader.addClass("header--initialized"); scrollDistOffset = 0; if ($("body").hasClass("header--hello--visible")) { scrollDistOffset += $("body").find(".header--hello").height(); } scrollDistRecalculated = scrollDist - ($("body").hasClass("header--hello--visible")?$("body").find(".header--hello--body").height():0); scrollDirection = "neutral"; if (scrollDistRecalculated < lastScrollDist) { scrollDirection = "up"; } else if (scrollDistRecalculated > lastScrollDist) { scrollDirection = "down"; } lastScrollDist = scrollDistRecalculated; if (!$("body").hasClass("header--hello--transitioning")) { thisHeaderAnchor.css({ "height":(thisHeaderBody.outerHeight()+($("body").hasClass("header--hello--visible")?$("body").find(".header--hello--body").height():0))+"px" }); $(".header--underlay").css({ "top":(thisHeaderBody.outerHeight()+77+($("body").hasClass("header--hello--visible")?$("body").find(".header--hello--body").height():0))+"px" }); $("..section--creatorcode--spacer .ExperienceViewer_experienceViewer_2hSVo").css({ "padding-top":(thisHeaderBody.outerHeight()+($("body").hasClass("header--hello--visible")?$("body").find(".header--hello--body").height():0))+"px" }); } stickyStart = 0; if ($("body").hasClass("header--hello--visible")&&(!$("body").hasClass("header--hello--closed"))) { stickyStart += $("body").find(".header--hello").height(); } stickyStart += thisHeaderBody.outerHeight(); if ((scrollDist > 0)&&(helloBarTransition != true)&&(!$("body").hasClass("mobilenav--active"))) { $("body").addClass("header--fixed"); $("body").removeClass("header--notfixed"); if (scrollDist >= stickyStart) { if (scrollDirection == "up") { thisHeader.removeClass("header--hidden"); thisHeader.css({ "top":"" }); } else if (scrollDirection == "down") { thisHeader.addClass("header--hidden"); thisHeader.css({ "top":(0)+"px" }); } } else { thisHeader.removeClass("header--hidden"); thisHeader.css({ "top":"" }); } } else { $("body").addClass("header--isanchored"); $("body").removeClass("header--issticky"); $("body").addClass("header--notfixed"); $("body").removeClass("header--fixed header--hidden"); $("body").addClass("header--visible"); thisHeader.css({ "top":"" }); } } if (typeof(sizeSubmenu) == "function") { sizeSubmenu(); } } function sizeMobilenav() { if ($("body").hasClass("mobilenav--active")) { if ($("body").hasClass("header--static")) { $(window).scrollTop(0); } $("body").find(".mobilenav--cta--spacer").css({ "height":"" }); headerHeight = $("body").find("header .header--body").height(); windowHeight = window.innerHeight; minHeight = windowHeight - headerHeight; $("body").find(".mobilenav").css({ "height":(minHeight)+"px" }); $("body").find(".mobilenav--panel").each(function () { if ($(this).find(".mobilenav--cta--spacer").length > 0) { panelBodyHeight = $(this).find(".mobilenav--panel--body").height(); panelCtaHeight = $(this).find(".mobilenav--cta--wrapper").outerHeight(); if (panelBodyHeight + panelCtaHeight + 21 < minHeight) { $(this).find(".mobilenav--cta--spacer").css({ "height":(minHeight - (panelBodyHeight + panelCtaHeight + 21))+"px" }); } } }); } else { $("body").find(".mobilenav, .mobilenav--cta--spacer").css({ "height":"0px" }); } } $("body").find(".header--main--menutrigger").click(function () { if ($("body").hasClass("mobilenav--active")) { $("body").removeClass("mobilenav--active"); sizeMobilenav(); } else { $("body").find(".mobilenav--nav").addClass("no--transition"); $("body").find(".mobilenav--nav")[0].offsetHeight; $("body").find(".mobilenav--nav").css({ "left":"" }); $("body").find(".mobilenav--panel").removeClass("mobilenav--panel--active"); $("body").find(".mobilenav--nav")[0].offsetHeight; $("body").find(".mobilenav--nav").removeClass("no--transition"); $("body").addClass("mobilenav--active"); sizeMobilenav(); } }); $("body").find(".header--main--nav .hs-menu-wrapper li.hs-item-has-children").hover(function () { thisChild = $(this).find(">ul"); thisChild.css({ "margin-left":"" }); windowWidth = $(window).width(); childOffset = thisChild.offset().left; childWidth = thisChild.width(); childOverlap = windowWidth - (childOffset + childWidth); if (childOverlap < 0) { thisChild.css({ "margin-left":(childOverlap)+"px" }); } }); $("body").find(".header--main--login ul li").hover(function () { thisChild = $(this).find(">ul"); thisChild.css({ "margin-left":"" }); windowWidth = $(window).width(); childOffset = thisChild.offset().left; childWidth = thisChild.width(); childOverlap = windowWidth - (childOffset + childWidth); if (childOverlap < 0) { thisChild.css({ "margin-left":(childOverlap)+"px" }); } }); $("body").find(".header--main--search--trigger--icon").click(function () { $(".header--secondary").removeClass('visuallyhidden'); $("body").addClass('header--underlay--show'); }); $("body").find(".header--main--search--close--icon").click(function () { $(".header--secondary").addClass('visuallyhidden'); $("body").removeClass('header--underlay--show'); }); $("body").find(".mobilenav--panel").each(function () { $(this).appendTo(".mobilenav--nav"); }); $("body").find(".mobilenav--nav--item--parent > a").click(function (e) { e.preventDefault(); thisDepth = parseInt($(this).closest(".mobilenav--panel").attr("data-depth")) + 1; thisRel = $(this).closest(".mobilenav--nav--item--parent").attr("rel"); thisPanel = $("body").find(".mobilenav--panel[rel='"+thisRel+"']"); thisPanelHeight = thisPanel.find(".mobilenav--panel--body").height(); $("body").find(".mobilenav--panel[data-depth='"+thisDepth+"']").scrollTop(0).css({ "z-index":"" }); $("body").find(".mobilenav--panel").removeClass("mobilenav--panel--active"); thisPanel.addClass("mobilenav--panel--active").css({ "z-index":"2" }); $("body").find(".mobilenav--upper").css({ "min-height":(thisPanelHeight)+"px" }); sizeMobilenav(); $("body").find(".mobilenav--nav").css({ "left":(-100 * thisDepth)+"%" }); }); $("body").find(".mobilenav--nav--back--label").click(function (e) { e.preventDefault(); thisDepth = parseInt($(this).closest(".mobilenav--panel").attr("data-depth")) - 1; thisRel = $(this).closest(".mobilenav--nav--back").attr("rel"); thisPanel = $("body").find(".mobilenav--panel[rel='"+thisRel+"']"); $("body").find(".mobilenav--panel[data-depth='"+thisDepth+"']").scrollTop(0).css({ "z-index":"" }); $("body").find(".mobilenav--panel").removeClass("mobilenav--panel--active"); thisPanel.addClass("mobilenav--panel--active").css({ "z-index":"2" }); sizeMobilenav(); $("body").find(".mobilenav--nav").css({ "left":(-100 * thisDepth)+"%" }); }); $(document).ready(function () { $(".header--main--nav .hs-menu-wrapper > ul > li").on('mouseenter', function(event) { $('.header--main--nav .hs-menu-wrapper > ul > li').removeClass("parent--inactive"); $('.header--main--nav .hs-menu-wrapper > ul > li').addClass("parent--inactive"); $(this).addClass("parent--active"); $(this).removeClass("parent--inactive"); }); $(".header--main--nav .hs-menu-wrapper > ul > li").on('mouseleave', function(event) { $('.header--main--nav .hs-menu-wrapper > ul > li').removeClass("parent--inactive"); $('.header--main--nav .hs-menu-wrapper > ul > li').removeClass("parent--active"); }); if ($(window).scrollTop() < 200) { $(window).scrollTop(0); } sizeHeader(); if (!$("body").hasClass("header--static")) { scrollDist = $(window).scrollTop(); stickyStart = 0; if ($("body").hasClass("header--hello--visible")) { stickyStart += $("body").find(".header--hello").height(); } stickyStart += $("body").find(".header--body").outerHeight(); if (scrollDist >= stickyStart) { thisHeader.addClass("header--fixed header--hidden no--transition"); thisHeader[0].offsetHeight; thisHeader.css({ "top":(-1 * stickyStart - 15)+"px" }); thisHeader[0].offsetHeight; thisHeader.removeClass("no--transition"); } } sizeMobilenav(); }); /* $(window).mousewheel(function () { sizeHeader(); }); $("body").on("touchmove", function () { sizeHeader(); }); */ $(document).scroll(function () { sizeHeader(); }); $(window).load(function () { sizeHeader(); sizeMobilenav(); }); $(window).resize(function () { sizeHeader(); sizeMobilenav(); }); function mobileSearch() { if ($("body").find(".mobilenav--search--input").val()) { if ($("body").find(".mobilenav--search--input").val().trim().length > 0) { window.location.href = "https://getfastr.com/search-results?term="+$("body").find(".mobilenav--search--input").val(); } } } $("body").find(".mobilenav--search--submit").click(function () { $("body").find(".mobilenav--search form").submit(); }); $("body").find(".header--main--search--submit").click(function () { $("body").find(".header--main--search--input form").submit(); });
FASTR Frontend - all indurstries
FASTR Frontend - all indurstries

Experience Fastr Frontend

See the power of Fastr Frontend on your website.

In our 30-minute demo, we’ll show you how quick and easy it is to create dynamic content, and deploy it, all with a few simple prompts and clicks. Find out how our robust Experience Canvas, adaptive AI assistant, and powerful integration and orchestration capabilities can transform every shopping experience on your ecommerce site.

Get a Demo

FASTR Frontend - all indurstries
FASTR Frontend - all indurstries