Lay Theme Forum

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

    Arrow keys for project navigation

    Feedback
    2
    2
    333
    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.
    • D
      dgknkrpnr last edited by

      Hi,

      I want to use arrow keys for going next or previous projects. So I found and added some custom html and it works nice. I go to next project when I press right key and left for previous. Perhaps this can be added easily to lay theme.

      I have Prev and Next links on my page already so I use them to JS click function.
      You have to add id to your Next and previous links like #previousarrlink and #nextarrlink

      Js:
      <script type="text/javascript">
      document.addEventListener("keyup",function(e){
      var key = e.which||e.keyCode;
      switch(key){
      //left arrow
      case 37:
      document.getElementById("previousarrlink").click();
      break;
      //right arrow
      case 39:
      document.getElementById("nextarrlink").click();
      break;
      }
      });
      </script>

      Project arrows function can have this as an addition too.
      Best.

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

        Hi dgknkrpnr!

        Ah! Sweet! I will tell Armin and will add it in our "list-for-the-future"!

        Thank you a lot!

        Marius

        www.mariusjopen.world

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

        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

        Recent Topics

        • C

          image carousel bugging out

        • N

          help needed with cleaning up and optimising lay theme portfolio website

        • R

          Html5 Video Player issue

        laytheme.com