Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Links to Content on Same Page

    General Discussion
    3
    3
    902
    Loading More Posts
    • 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
      kian last edited by

      I was wondering if it was possible to have links in a category page that direct you to content that is lower on the same page.

      1 Reply Last reply Reply Quote 0
      • arminunruh
        arminunruh Global Moderator last edited by

        Hey kian!

        Please update to the latest lay theme 1.9.7

        Now right click an element or row where you want your button to scroll to. Choose "Set HTML class and id". Now type in an id, for example: myid

        Now create a textelement, write a word, select the word, click the "link" button and as the link-target type in: #myid

        This is the standard html way to do this ( standards are good :) ). Now you probably wanna have a scroll animation for that. You can use this javascript for that.

        Enter it in "Lay Options" -> "Custom CSS & HTML"

        <script>
            jQuery(document).on("click", "a[href*=#]", function(e){
                e.preventDefault();
                var targetId = jQuery(this).attr("href");
                jQuery('html, body').animate({
                    scrollTop: jQuery(targetId).offset().top,
                },
                {
                    duration: 2000,
                    easing: "easeOutSine"
                });
            });
        </script>
        

        You can also choose another easing of these listed here in "example" http://gsgd.co.uk/sandbox/jquery/easing/

        Hayo Gebauer 1 Reply Last reply Reply Quote 0
        • Hayo Gebauer
          Hayo Gebauer @arminunruh last edited by

          @arminunruh thanks for also teaching us some coding basics :blush:

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Try this to fix issues before you post:

          Use the Search Feature. Maybe there is already a solution to your issue.

          1. Update Lay Theme and all Lay Theme Addons
          2. Disable all Plugins
          3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
          4. Now see if your problem solved itself
          5. Go here, see if your problem is listed here:
          Troubleshooting

          When you post:
          1. Post a link to where the problem is
          2. If the problem is difficult to explain, post screenshots / link to a video to explain it

          Thanks!

          Online Users

          T
          E
          H
          A

          Recent Topics

          • T

            Fullscreen Slider Addon not working

          • A

            Designer Websites for free Lay Theme.

          • A

            Broken images

          • A

            Image hover -> Image on image

          laytheme.com