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 868899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:13:13+00:00 2026-05-15T10:13:13+00:00

Can you do this, like you can with MooTools http://ryanflorence.com/slideshow/#navigation-demo in jQuery? So you

  • 0

Can you do this, like you can with MooTools

http://ryanflorence.com/slideshow/#navigation-demo

in jQuery? So you can navigate like that and use left/right keys?

  • 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-05-15T10:13:14+00:00Added an answer on May 15, 2026 at 10:13 am

    sure you could.

    just capture the keydown event for the document

    $(document).keydown(function(evt) {
       evt = evt || event;
       switch (evt.keycode) {
          case 37: //your left keycode
              //now in each case statement you could 
              //load a new page via ajax and animate 
              //the new page into view.
              // or you could do something different. 
    
          case 39: //your right keycode
    
          case 38: //your up keycode
    
          case 40: //your down keycode
       }
    
    })
    

    Edited: Below is a functional solution that you can play with. Basically this solution creates some divs and fades them in and out using the left and right arrow keys.

    <html>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready( function () {
            $(document).keydown(function(evt) {
                evt = evt || event;
                var currentControlBoxIndex = parseInt($(".controlBox.controlBoxHighlight").text(), 10);
                var leftControlBoxIndex = currentControlBoxIndex == 1 ? 3 : currentControlBoxIndex - 1;
                var rightControlBoxIndex = currentControlBoxIndex == 3 ? 1 : currentControlBoxIndex + 1;
                $("#f" + currentControlBoxIndex).toggleClass("controlBoxHighlight");
                $("#fade" + currentControlBoxIndex).fadeOut("slow", function () {
                    $(this).toggleClass("controlBoxHighlight");
                });
    
                switch (evt.keyCode) {
                    case 37: 
                        $("#f" + leftControlBoxIndex).toggleClass("controlBoxHighlight");
                        $("#fade" + leftControlBoxIndex).fadeIn("slow", function () {
                            $(this).toggleClass("controlBoxHighlight");
                        });
    
                        break;
                    case 39: //your right keycode 
                        $("#f" + rightControlBoxIndex).toggleClass("controlBoxHighlight");
                        $("#fade" + rightControlBoxIndex).fadeIn("slow", function () {
                            $(this).toggleClass("controlBoxHighlight");
                        });
                        break;
                }
           });
        });
    </script>
    <style type="text/css">
        #controls {
            position:absolute;
            left:100px;
            bottom: 100px;
            z-index: 500;
        }
        .controlBox {
            border: 1px solid #000000;
            margin: 10px;
            display: block;
            float: left;
            width: 20px;
            height:20px;
            text-align: center;
        }
        .controlBoxHighlight{
            color: #FFFFFF;
            background-color: #000000;
        }
        .fadeDiv {
            position:absolute;
            left:0px;
            top:0px;
            width:100%;
            height:100%;
        }
        .fadeDivTop {
            z-index: 100;
        }
        .fadeDivBottom {
            z-index: -100;
        }
    </style>
    <body>
        <div id="fade1" class="fadeDiv fadeDivTop" style="background-color:#FF0000;">
        </div>
        <div id="fade2" class="fadeDiv" style="background-color:#00FF00;">
        </div>
        <div id="fade3" class="fadeDiv" style="background-color:#0000FF;">
        </div>
        <div id ="controls">
            <span id="f1" class="controlBox controlBoxHighlight">1</span>
            <span id="f2" class="controlBox">2</span>
            <span id="f3" class="controlBox">3</span>
        </div>
    </div>
    
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a database library in C# that we can use like this: DatabaseConnection
This is about the (mootools-like) kwicks Jquery plugin: http://www.jeremymartin.name/projects.php?project=kwicks I have the same problem
How is it that tools like this one can make an ajax style call
I have a loop that can look like this: For Each article In artAll
I got the following Expression that can look like this (the amount of Sqrt[XXX]
I need to sort an array that can look like this: $array[4][0] = array('id'
In an attempt to circumvent a MooTool/JQuery conflict with this idea :: http://davidwalsh.name/jquery-mootools I
Can this be done? It seems like this should be possible. In general, I
We have several areas where code like this can be seen public Map extractData(ResultSet
You can backreference like this in JavaScript: var str = 123 $test 123; str

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.