Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. error loading page (frontend.app.min.js)

error loading page (frontend.app.min.js)

Scheduled Pinned Locked Moved Bug Reports
4 Posts 2 Posters 63 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kimberlyxx
    wrote on last edited by
    #1

    Hey :)
    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.
    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&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.

    Do you guys have any idea whats happening or a different way how I could achive it?

    best,
    kimberly

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear Kimberly

      @kimberlyxx

      There was mention of something similar at the start of the year but i believe was fixed with updates.

      Could you test this behaviour in a vanilla Lay Theme environment to be sure?

      Wordpress, Lay Theme & Laytheme's Addons are all up to date ?

      Any custom CSS or JS that may interfere is temporarily removed.

      Any third-party plugins are de-activated to see if this resolves the issue.

      If you could post a link to your website with the problem behaviour this will also help šŸŒ


      Talk soon Kimberly and have a wonderful day šŸ–
      Richard
      1 Reply Last reply
      0
      • K Offline
        K Offline
        kimberlyxx
        wrote on last edited by
        #3

        Hey Richard,

        thank you for your answer!
        The thing is, other custom js are triggered totally normal :/
        I will put a console log in the function, so you can see what I mean :)

        Issue: The click function is only triggered once and not everytime a data-type="project" is getting clicked.

        Achieve: On project thumbnail click, scroll to top.

        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.

        thank you so much!

        https://collectiveinterest.de/

        1 Reply Last reply
        0
        • RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Dear Kimberly

          @kimberlyxx

          Cool website! To be sure is your JS added via a "newpage event"? šŸ”(realised i didnt ask this first)

          https://laytheme.com/documentation.html#custom-javascript

          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.


          Example:

          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
          
          // JS inserted here --
          
          });
          

          Am i correct this is your Code?

            jQuery('[data-type="project"]').on('click', function() {
                  console.log('project clicked');
              });
          

          The console log seems to be working:
          Screen Shot 2021-11-01 at 11.26.20 AM.png

          So you want some JS saying similar to:

          jQuery('[data-type="project"]').on('click', function() {
                  console.log('project clicked');
                  jQuery("body").scrollTop()
              });
              
          

          Talk soon Kimberly & best wishes ✨
          Richard
          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          I also code custom websites or custom Lay features.
          šŸ’æ Email me here: šŸ’æ
          info@laytheme.com

          Before you post:
          1. When using a WordPress Cache plugin, disable it or clear your cache.
          2. Update Lay Theme and all Lay Theme Addons
          3. Disable all Plugins
          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

          This often solves issues you might run into

          When you post:
          1. Post a link to where the problem is
          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
          Online Users
          arminunruhA
          arminunruh
          F
          francesco
          L
          lurchifon
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search