WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Add left right keyboard navigation to thickbox (3 posts)

  1. drtanz
    Member
    Posted 2 years ago #

    How can I add the left and right key buttons on the keyboard to the Thickbox navigation functionality? At the moment it uses < and > for browsing through the gallery. Thanks

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

  2. alxkls
    Member
    Posted 2 years ago #

    I do realize that this thread is more than 6 months old but this particular issue was bothering me for a while, looked for a solution online and couldn't find one. So I spent some time trying to work it out and I did. I decided to post it here since I'm probably far not the only one who is trying to figure it out. It's as simple as it could get. go to
    /wp-includes/js/

    open thickbox.js and look for e.which and you will find the following:

    if ( e.which == 27 ){ // close
    					if ( ! jQuery(document).triggerHandler( 'wp_CloseOnEscape', [{ event: e, what: 'thickbox', cb: tb_remove }] ) )
    						tb_remove();
    
    				} else if ( e.which == 190 ){ // display previous image 190(<)
    					if(!(TB_NextHTML == "")){
    						jQuery(document).unbind('thickbox');
    						goNext();
    					}
    				} else if ( e.which == 188 ){ // display next image 188 (>)
    					if(!(TB_PrevHTML == "")){
    						jQuery(document).unbind('thickbox');
    						goPrev();
    					}
    				}

    once you find that-replace 190 with 39 and 188 with 37. save and you are done

  3. kjetilgf
    Member
    Posted 2 years ago #

    Works with ngg 1.9.3 but not with 1.9.5 b
    Just a little correction: The correct file path is wp/wp-includes/js/thickbox/thickbox.js
    Thanks for posting!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.