From d936a2f8946c1bb80c363c8429de9728d04566ad Mon Sep 17 00:00:00 2001 From: Aytac Kokus Date: Tue, 1 Feb 2022 12:16:53 +0100 Subject: [PATCH] fix #337 --- layout/js/scripts.js | 2 +- layout/js/scripts.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/js/scripts.js b/layout/js/scripts.js index a40d9f8..c94823e 100755 --- a/layout/js/scripts.js +++ b/layout/js/scripts.js @@ -22,7 +22,7 @@ jQuery(document).ready(function ($) { if (target.length) { $('html,body').animate( { - scrollTop: target.offset().top - $('#sticky-wrapper').outerHeight(true), + scrollTop: target.offset().top - ( $( '#sticky-wrapper' ).outerHeight( true ) || 0 ) }, 1000 ); diff --git a/layout/js/scripts.min.js b/layout/js/scripts.min.js index befd0e4..30257d6 100644 --- a/layout/js/scripts.min.js +++ b/layout/js/scripts.min.js @@ -1,2 +1,2 @@ -jQuery(document).ready(function(i){var n=i(window).width();i(window).height(),i(document).width(),i(document).height();function o(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&(i("#counter").css("background-attachment","scroll"),i("#testimonials").css("background-attachment","scroll"))}function c(){var e=i("#projects .project"),t=i(e).width();i(e).css("height",t)}i(function(){var e,t;o(),i('body:not(.single-product) a[href*="#"]:not([href="#"])').on("click",function(){var e;if(location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname&&(e=(e=i(this.hash)).length?e:i("[name="+this.hash.slice(1)+"]")).length)return i("html,body").animate({scrollTop:e.offset().top-i("#sticky-wrapper").outerHeight(!0)},1e3),!1}),i(".open-responsive-menu").click(function(){var e=i(".top-header").outerHeight(),t=i(window).height()-e;i("#header").hasClass("header-has-sticky-menu")&&i(".responsive-menu").css({top:e,"max-height":t}),i(".responsive-menu").toggle("slow",function(){i(this).toggleClass("active")})}),c(),i("#services .section-content .service").length&&i("#services .section-content .service").each(function(){var e=i(this),t=i(e).children(".service-icon"),n=i(e).children(".service-title"),o=i(e).data("service-color");i(t).css("color",o),i(n).css("color",o)}),i("#team .section-content .person").length&&i("#team .section-content .person").each(function(){var e=i(this),t=i(e).data("person-color"),n=i(e).children(".person-content").children(".person-position"),o=i(e).children(".person-content").children(".person-content-social.clearfix").children("li").children("a");i(n).css("color",t),i(o).css({"border-color":t,color:t})}),i("#header .top-header .header-navigation ul li.menu-item-has-children").length&&(e=i("#header .top-header .header-navigation ul li.menu-item-has-children ul"),i(e).each(function(){n-i(this).offset().left<200&&i(this).css("left","-200px")})),0<(t=i(".illdy-top")).length&&(t.click(function(e){e.preventDefault(),i("html,body").animate({scrollTop:0},1e3)}),i(document).scroll(function(){300<=window.scrollY?t.addClass("is-active"):t.removeClass("is-active")}))}),i(window).resize(function(){i(function(){c()})})}); +jQuery(document).ready(function(e){var t=e(window).width();e(window).height(),e(document).width(),e(document).height();function n(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&(e("#counter").css("background-attachment","scroll"),e("#testimonials").css("background-attachment","scroll"))}function o(){var t=e("#projects .project"),n=e(t).width();e(t).css("height",n)}e(function(){var i,c;n(),e('body:not(.single-product) a[href*="#"]:not([href="#"])').on("click",function(){var t;if(location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname&&(t=(t=e(this.hash)).length?t:e("[name="+this.hash.slice(1)+"]")).length)return e("html,body").animate({scrollTop:t.offset().top-(e("#sticky-wrapper").outerHeight(!0)||0)},1e3),!1}),e(".open-responsive-menu").click(function(){var t=e(".top-header").outerHeight(),n=e(window).height()-t;e("#header").hasClass("header-has-sticky-menu")&&e(".responsive-menu").css({top:t,"max-height":n}),e(".responsive-menu").toggle("slow",function(){e(this).toggleClass("active")})}),o(),e("#services .section-content .service").length&&e("#services .section-content .service").each(function(){var t=e(this),n=e(t).children(".service-icon"),o=e(t).children(".service-title"),i=e(t).data("service-color");e(n).css("color",i),e(o).css("color",i)}),e("#team .section-content .person").length&&e("#team .section-content .person").each(function(){var t=e(this),n=e(t).data("person-color"),o=e(t).children(".person-content").children(".person-position"),i=e(t).children(".person-content").children(".person-content-social.clearfix").children("li").children("a");e(o).css("color",n),e(i).css({"border-color":n,color:n})}),e("#header .top-header .header-navigation ul li.menu-item-has-children").length&&(i=e("#header .top-header .header-navigation ul li.menu-item-has-children ul"),e(i).each(function(){t-e(this).offset().left<200&&(e(this).css("left","-200px"),e(this).css("top","50px"))})),(c=e(".illdy-top")).length>0&&(c.click(function(t){t.preventDefault(),e("html,body").animate({scrollTop:0},1e3)}),e(document).scroll(function(){window.scrollY>=300?c.addClass("is-active"):c.removeClass("is-active")}))}),e(window).resize(function(){e(function(){o()})})}); //# sourceMappingURL=scripts.min.js.map \ No newline at end of file