WordPress.org

Forums

NextGEN Gallery
Using arrow keys for navigation (3 posts)

  1. seebergen
    Member
    Posted 2 years ago #

    Hi.

    Is there a way to enable left and right arrow keys to navigate pictures when using the Thickbox JavaScript Thumbnail effect?

    When clicking on a thumb on this page at SeeBergen, where there are 12 pictures I would love to use tha arrow keys to navigate forward and backwards.

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. seebergen
    Member
    Posted 2 years ago #

    I solved the problem by installing this Lightbox WordPress Plugin and than activating Lightbox from the Galley --> Options --> Effects page.

  3. sprasadb4u
    Member
    Posted 2 years ago #

    open the Imagebrowser.php in your nextgen gallery plugin folder and add the following java script after the code.

    FIND :

    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>

    ------------ aDD THE following java script after the above Code ------

    <script>

    jQuery(document).keydown(function(e){

    if (e.keyCode == 37) {
    // alert( "left pressed" );
    window.location = "<?php echo $image->previous_image_link ?>#pic";
    //alert('prev');
    return false;
    }

    if (e.keyCode == 39) {
    window.location = "<?php echo $image->next_image_link ?>#pic";
    //alert('next');
    return false;

    }
    });

    </script>

    ----------------------------------------

    Working 100% Have fun

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic