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. General Discussion
  3. Anchor points in touchdevices not working

Anchor points in touchdevices not working

Scheduled Pinned Locked Moved General Discussion
17 Posts 6 Posters 309 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.
  • C Offline
    C Offline
    cyrus
    wrote on last edited by cyrus
    #5

    Having a similar problem with touch, but also just issues with the anchor behaviour generally. Have updated Lay to the latest but not solving my problem:

    site: http://indofutures.com (test domain for now)

    I'm using some this script below to navigate to a section on the site using the #id no matter what page they are on.

    <script>
        window.laytheme.on('newpageshown', function(){
          if(window.location.hash.length > 0){
              var id = window.location.hash;
              if(jQuery(id).length > 0){
                    jQuery('html, body').animate(
                    { scrollTop: jQuery(id).offset().top },
                    { duration: 1200 });
              }
          } 
        });
    </script>
    

    On the site I'm using this to navigate to the Projects section of my homepage, using the 'Projects' entry in the navigation. This section currently has an anchor on an empty row with id=projects. To make this very visible during testing I've written the word anchor in this row so I could see what was going on.

    (I'm using an anchor to an empty row in this way as the row I would like to anchor to (the row with the marquee 'Projects') has offsets and spacing and scroll behaviour seems to be very erratic with those settings(?)

    Anyway, I am running into 2 issues:

    1: Scrolling behaviour is not consistent:
    Depending on which page I click the 'Projects' link, the position I am taken to on the home page and project section is different. For example on the home page when I click on Projects it takes me to the anchor top which is perfect as this is this account for the space of the stick navigation. However if I click through from other pages e.g. any project page or the info page, there is a large gap to the anchor and I can even see part of the section above (which is black) which ruins the aesthetics.

    (This behaviour is true on Firefox and Chrome, have not tested other browsers. The behaviour also seems to be slightly different between the browsers.)

    2: On mobile from the hamburger nav there are a few issues with the same link

    a) On homepage If I tap on 'Projects' entry nothing happens - the menu stays open and I'm not navigated to the section

    b) On other pages if I open the menu and tap 'Projects' I am just taken to the homepage but not the relevant section.

    Would love to find a solution to this, I was looking at the site of the OP and seems they changed the navigation since it is not working on mobile which I hope to avoid!

    1 Reply Last reply
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #6

      I think there might be a bug in the code:

      <script>
          window.laytheme.on('newpageshown', function(){
            if(window.location.hash.length > 0){
                var id = window.location.hash;
                if(jQuery(id).length > 0){
                      jQuery('html, body').animate(
                      { scrollTop: jQuery('#' + id).offset().top },
                      { duration: 1200 });
                }
            } 
          });
      </script>
      

      Let me know if that helped!

      Best!
      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cyrus
        wrote on last edited by
        #7

        Hey Marius!
        Thanks for your reply, implemented the little fix above, actually made the situation worse:

        If you check on the site, www.indofutures.com ; navigate to another page e.g. www.indofutures.com/info and then click on the 'project' navigation entry. All visual content now disappears.

        The mobile menu still does not work - is this a laytheme limitation?

        Thanks
        Cyrus

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cyrus
          wrote on last edited by
          #8

          Just to add some visual references in case the problem isn't obvious. You can ignore the position of the title "Projects' as it's a scrolling marquee...

          Screenshot of page after navigating back using the 'Projects' link

          61d210eb-8a97-4a27-92bf-10bc249e7f5d-image.png


          Expected result (normal load)

          c4a6fd6d-2d9e-42f1-a217-7922e3eaf5d1-image.png

          Basically all image assets fail to load now.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cyrus
            wrote on last edited by
            #9

            Any update on this please?

            1 Reply Last reply
            0
            • mariusjopenM Offline
              mariusjopenM Offline
              mariusjopen
              Global Moderator
              wrote on last edited by
              #10

              Dear @gyoc
              sorry for the delay. We are looking into it right now and will get back on Monday.
              Best!
              Marius

              www.mariusjopen.world

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cyrus
                wrote on last edited by
                #11

                Hey @mariusjopen please do get back to us when you have a chance :)

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cyrus
                  wrote on last edited by
                  #12

                  Is support down for laytheme then? In the absence I switched back to the original broken code which at least doesn't make visuals disappear when I click on an anchor link :) But real help would be massively appreciated

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

                    Dear @gyoc

                    It's my Fault that this reply has come so late & should have been much much sooner, forgive me.

                    If you have not found a solution could you please send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
                    And we will take a deeper look

                    Thank you for your patience, For using Lay Theme and for being awesome.

                    Best wishes

                    Sincerely
                    Richard

                    fabiandraxlF 1 Reply Last reply
                    0
                    • RichardR Richard

                      Dear @gyoc

                      It's my Fault that this reply has come so late & should have been much much sooner, forgive me.

                      If you have not found a solution could you please send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
                      And we will take a deeper look

                      Thank you for your patience, For using Lay Theme and for being awesome.

                      Best wishes

                      Sincerely
                      Richard

                      fabiandraxlF Offline
                      fabiandraxlF Offline
                      fabiandraxl
                      wrote on last edited by
                      #14

                      @gyoc @Richard

                      Did you both found a solution for the above mentioned problems since then?
                      Could you maybe post it here?

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

                        Dear @fabiandraxl

                        Because this thread is quite long and contains different points - Could you please clarify the problem you have again? šŸŒ


                        Talk soon & best wishes
                        Richard
                        fabiandraxlF 1 Reply Last reply
                        0
                        • RichardR Richard

                          Dear @fabiandraxl

                          Because this thread is quite long and contains different points - Could you please clarify the problem you have again? šŸŒ


                          Talk soon & best wishes
                          Richard
                          fabiandraxlF Offline
                          fabiandraxlF Offline
                          fabiandraxl
                          wrote on last edited by
                          #16

                          Hej @Richard,

                          I meant the problem with the mobile anchor points which have not worked on my mobile layout, but in the meantime was able to locate the problem.

                          Even when elements on the rows are synced between mobile and desktop-layout the custom ID for the anchors were not synced. I had to ad it manually on both layouts and it started to work.

                          Maybe a Bug you should further look into or should it be like that? :P

                          Thanks,
                          Fabi

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

                            Dear Fabi

                            @fabiandraxl

                            Thanks for the update & noted āœ…


                            Best wishes
                            Richard
                            1 Reply Last reply
                            1
                            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
                            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