WordPress.org

Ready to get started?Download WordPress

Forums

WP jQuery Lightbox
Keyboard navigation conflict with another script (1 post)

  1. googlebot
    Member
    Posted 9 months ago #

    HI, thanks for the plugin, I've been using it on many WP installs, jsut recently I noticed a small problem with one of my sites where the plugin is implemented.

    I use this function to enable keyboard navigation between post.

    (function($){
       $(document).ready(function () {
          $(document).keydown(function(e) {
             var url = false;
             if (e.which == 37) {  // Left arrow key code
                url = $('.prev a').attr('href');    }
             else if (e.which == 39) {  // Right arrow key code
                url = $('.next a').attr('href');    }
             if (url) { window.location = url;   }
         });
       });
    })(jQuery);

    But it stops workign as soon as an image is clicked and the plugin takes over.
    How can I fix it?

    Thanks

    http://wordpress.org/plugins/wp-jquery-lightbox/

Reply

You must log in to post.

About this Plugin

About this Topic