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. Link to an Anchor on another page

Link to an Anchor on another page

Scheduled Pinned Locked Moved General Discussion
12 Posts 2 Posters 544 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.
  • L Offline
    L Offline
    limelight
    wrote on last edited by
    #1

    Hi there guys,

    I know there are several threads on this topic, but I am still having problems linking to an anchor on a different page to the original link.

    The company icons on the home page here:
    https://limelightmedia.tv/home/

    are all supposed to link to a specific section on the previous work page here:
    https://limelightmedia.tv/previous-work/

    When I click each link for example #zurich a / appears before the anchor link in the navigation bar eg.
    https://limelightmedia.tv/previous-work/#zurich

    I don't know if that is whats causing the problem...

    At the moment I have the code you previously suggested in the custom head content:

    <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>

    Any further help is massively appreciated!
    Cheers!

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

      Dear @limelight

      Did you have a look here?

      Definitive guide to 'Smooth scroll to anchors from menu'
      http://laythemeforum.com:4567/topic/4200/definitive-guide-to-smooth-scroll-to-anchors-from-menu/2

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • L Offline
        L Offline
        limelight
        wrote on last edited by
        #3

        Hi there Marius,

        I have just tried that code and no change i'm afraid...

        Any other suggestions??

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

          Dear @limelight
          can you show an example, where you applied your link?

          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • L Offline
            L Offline
            limelight
            wrote on last edited by
            #5

            Sure thing!

            The company icons on the home page here:
            https://limelightmedia.tv/home/

            are all supposed to link to a specific section on the previous work page here:
            https://limelightmedia.tv/previous-work/

            When I click each link for example #zurich a / appears before the anchor link in the navigation bar eg.
            https://limelightmedia.tv/previous-work/#zurich

            I don't know if that is whats causing the problem...

            1 Reply Last reply
            0
            • L Offline
              L Offline
              limelight
              wrote on last edited by
              #6

              Hi there just wondering if you had any updates on this one?

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

                Dear @limelight
                did you give the row an ID called zurich?

                Best!

                Marius

                www.mariusjopen.world

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  limelight
                  wrote on last edited by
                  #8

                  Hi there Marius,

                  No, not the row, Just the image icon has a link to:
                  https://limelightmedia.tv/previous-work#zurich

                  And then there is an anchor id=zurich on the previous work page. The same for each company icon... I did just quickly try giving the row an ID on the previous work page, but still no luck...

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

                    Dear @limelight
                    I do not see here an ID which could get used as anchor:
                    0_1565802814175_Bildschirmfoto 2019-08-14 um 19.13.08.png

                    Marius

                    www.mariusjopen.world

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      limelight
                      wrote on last edited by
                      #10

                      Hi there @mariusjopen

                      The anchor is in the body of the text in the HTML...

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        limelight
                        wrote on last edited by
                        #11

                        Hi @mariusjopen

                        I have changed it so the anchor ID is the div element rather than within the html and still not working i'm afraid.![alt text] 0_1566904046676_Screenshot 2019-08-27 at 12.06.13.png

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

                          Dear @limelight
                          to make it easy for people to understand:
                          Can you please paste the code which you used?

                          Best!

                          Marius

                          www.mariusjopen.world

                          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
                          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