Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8227491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:08:39+00:00 2026-06-07T16:08:39+00:00

OK so here is the scenario, I want the user to be able to

  • 0

OK so here is the scenario, I want the user to be able to press the right and left arrow keys on the keyboard and make the jquery slideshow on the page trigger the next slide. I would like to use the right arrow key but any key other than enter, space, or tab will do (I ONLY WANT ONE KEY TO DO THIS). I was thinking something like

$('#target').keyup(function(event){.doslide();}

or something any help will be greatly appreciated.

<script type="text/javascript">
                            var slo=null;
                            var sola = Array();
                            var prev = 0;
                            var cur = 1;
                            var timi=null

                            jQuery.noConflict()
                            jQuery(document).ready(function() {
                                sol = $(".slide")
                                var sho = document.getElementById('slidya').getElementsByTagName('a');

                                for(var i=1;i<sho.length-1;i++)sola.push(sho[i]);

                                for(var i=1;i<sol.length;i++)sol[i].style.display = 'none';                        

                                timi = window.setInterval('doslide()',10000);

                            })
                            function doslide()
                                {
                                    $(sol[prev]).fadeOut(3000);
                                    $(sol[cur]).fadeIn(3000);
                                    sola[prev].className = 'number'
                                    sola[cur].className = 'number select'

                                    prev = cur++;
                                    if(cur>sol.length-1)
                                    {
                                        cur=0;
                                        prev= sol.length-1;
                                    }
                                }
                                function prevnext(mode)
                                {
                                    window.clearInterval(timi);timi=null;

                                    if(mode)
                                    {
                                        if(cur>sol.length-1)
                                        {
                                            cur=0;
                                            prev= sol.length-1;
                                        }
                                        doslide();      
                                    }
                                    else
                                    {
                                        cur--;
                                        prev--;

                                        if(prev<0)
                                        {
                                            cur=0;
                                            prev= sol.length-1;
                                        }
                                        if(cur<0)
                                        {
                                            cur=sol.length-1;
                                            prev=cur-1 ;        
                                        }

                                        $(sol[cur]).fadeOut(3000);
                                        $(sol[prev]).fadeIn(3000);
                                        sola[cur].className = 'number'
                                        sola[prev].className = 'number select' 
                                    }
                                    timi = window.setInterval('doslide()',10000)
                                }
                                function thisisit(aiyo)
                                {
                                    cur = aiyo
                                    window.clearInterval(timi);timi=null;

                                    $(sol[cur]).fadeIn(1000);
                                    $(sol[prev]).fadeOut(1000);
                                    sola[cur].className = 'number select'
                                    sola[prev].className = 'number'

                                    prev=cur
                                    ++cur;
                                    if(prev<0)prev = sol.length-1;
                                    timi = window.setInterval('doslide()',10000)     
                                }


                        </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:08:41+00:00Added an answer on June 7, 2026 at 4:08 pm

    I would try something like this:

    var VK_LEFT = 37,
        VK_UP =  38,
        VK_RIGHT =  39,
        VK_DOWN = 40;
    
    $(document).keydown(function(e){
       var key = (e.keyCode ? e.keyCode : e.which);
    
       if(key==VK_RIGHT)
           doslideright();
       else if(key==VK_LEFT)
           doslideleft();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the scenario: I want to be able to print the C Style
Here's the scenario, I want to get Data from the Service to Activity Whenever
Here's the scenario: In production, I want to send and receive sms messages. In
So here is the scenario: I have a MOSS 2007 box and I want
I want to open pdf file in webview but the scenario is different here,
So, here is the scenario: I want to create a installer which would just
Here is the scenario : 1) Created on Web Application project for reusable user
Here's a scenario that I am working on : Right now we have a
Here is what I'm trying to do: I want to be able to finish
Imagine a scenario where, using xml, the user is able to specify ranges in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.