Ready to get started?Download WordPress


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

  1. googlebot
    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.

       $(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;   }

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




You must log in to post.

About this Plugin

About this Topic