<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[error loading page (frontend.app.min.js)]]></title><description><![CDATA[<p dir="auto">Hey :)<br />
On my landing page i add my projects as project thumbs and I noticed when I click on them it doesn't scroll up to the top again and kind of stays at the scroll position i was at before.<br />
I tried to add a click event on the "data-type=project" in order to then set a jQuery(window).scrollTop(0);. But If I add the function (in the lay html&amp;css option inside the head script), the console log for my click event fires once and when i go back to the main page i get a "error loading page" message and the javascript is not getting triggered anymore.</p>
<p dir="auto">Do you guys have any idea whats happening or a different way how I could achive it?</p>
<p dir="auto">best,<br />
kimberly</p>
]]></description><link>https://laythemeforum.com/topic/7297/error-loading-page-frontend-app-min-js</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 08:34:51 GMT</lastBuildDate><atom:link href="https://laythemeforum.com/topic/7297.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Oct 2021 21:24:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to error loading page (frontend.app.min.js) on Sun, 31 Oct 2021 22:47:35 GMT]]></title><description><![CDATA[<h3>Dear Kimberly</h3>
<h6><a class="plugin-mentions-user plugin-mentions-a" href="/user/kimberlyxx">@<bdi>kimberlyxx</bdi></a></h6>
<p dir="auto">Cool website! To be sure is your JS added via a "newpage event"? 🔍(realised i didnt ask this first)</p>
<blockquote>
<p dir="auto"><a href="https://laytheme.com/documentation.html#custom-javascript" target="_blank" rel="noopener noreferrer nofollow ugc">https://laytheme.com/documentation.html#custom-javascript</a></p>
</blockquote>
<p dir="auto">Lay Theme is a Single page app meaning the ready event only fires once on page load. This creates seamless navigation as new projects and pages are not a new 'Hard load'. This may help answer you question as to why the behaviour is a certain way.</p>
<hr />
<p dir="auto">Example:</p>
<pre><code>window.laytheme.on("newpageshown", function(layoutObj, type, obj){

// JS inserted here --

});
</code></pre>
<p dir="auto">Am i correct this is your Code?</p>
<pre><code>  jQuery('[data-type="project"]').on('click', function() {
        console.log('project clicked');
    });
</code></pre>
<p dir="auto">The console log seems to be working:<br />
<img src="/assets/uploads/files/1635719210598-screen-shot-2021-11-01-at-11.26.20-am-resized.png" alt="Screen Shot 2021-11-01 at 11.26.20 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So you want some JS saying similar to:</p>
<pre><code>jQuery('[data-type="project"]').on('click', function() {
        console.log('project clicked');
        jQuery("body").scrollTop()
    });
    
</code></pre>
<hr />
<h5>Talk soon Kimberly &amp; best wishes ✨</h5>
<h5>Richard</h5>
]]></description><link>https://laythemeforum.com/post/27075</link><guid isPermaLink="true">https://laythemeforum.com/post/27075</guid><dc:creator><![CDATA[Richard]]></dc:creator><pubDate>Sun, 31 Oct 2021 22:47:35 GMT</pubDate></item><item><title><![CDATA[Reply to error loading page (frontend.app.min.js) on Sat, 30 Oct 2021 13:49:24 GMT]]></title><description><![CDATA[<p dir="auto">Hey Richard,</p>
<p dir="auto">thank you for your answer!<br />
The thing is, other custom js are triggered totally normal :/<br />
I will put a console log in the function, so you can see what I mean :)</p>
<p dir="auto">Issue: The click function is only triggered once and not everytime a data-type="project" is getting clicked.</p>
<p dir="auto">Achieve: On project thumbnail click, scroll to top.</p>
<p dir="auto">How it is now: when you scroll down the landing page (project overview) and click on one project, the scrollbar stays at the same position and doesnt automatically scroll to the top.</p>
<p dir="auto">thank you so much!</p>
<p dir="auto"><a href="https://collectiveinterest.de/" target="_blank" rel="noopener noreferrer nofollow ugc">https://collectiveinterest.de/</a></p>
]]></description><link>https://laythemeforum.com/post/27055</link><guid isPermaLink="true">https://laythemeforum.com/post/27055</guid><dc:creator><![CDATA[kimberlyxx]]></dc:creator><pubDate>Sat, 30 Oct 2021 13:49:24 GMT</pubDate></item><item><title><![CDATA[Reply to error loading page (frontend.app.min.js) on Tue, 26 Oct 2021 22:37:36 GMT]]></title><description><![CDATA[<h3>Dear Kimberly</h3>
<h6><a class="plugin-mentions-user plugin-mentions-a" href="/user/kimberlyxx">@<bdi>kimberlyxx</bdi></a></h6>
<p dir="auto">There was mention of something similar at the start of the year but i believe was fixed with updates.</p>
<p dir="auto">Could you test this behaviour in a vanilla Lay Theme environment to be sure?</p>
<blockquote>
<p dir="auto">Wordpress, Lay Theme &amp; Laytheme's Addons are all up to date ?</p>
</blockquote>
<blockquote>
<p dir="auto">Any custom CSS or JS that may interfere is temporarily removed.</p>
</blockquote>
<blockquote>
<p dir="auto">Any third-party plugins are de-activated to see if this resolves the issue.</p>
</blockquote>
<p dir="auto">If you could post a link to your website with the problem behaviour this will also help 🌝</p>
<hr />
<h5>Talk soon Kimberly and have a wonderful day 🏖</h5>
<h5>Richard</h5>
]]></description><link>https://laythemeforum.com/post/27001</link><guid isPermaLink="true">https://laythemeforum.com/post/27001</guid><dc:creator><![CDATA[Richard]]></dc:creator><pubDate>Tue, 26 Oct 2021 22:37:36 GMT</pubDate></item></channel></rss>