Jump to content

[SOLVED] Using navigation keys in Thickbox


Recommended Posts

Hi everyone,
I have a question about navigation keys in Thickbox. Can I use arrow keys (navigation keys) on the keyboard to see the next and previous images on the Thickbox window ? Is it possible :( ? I think it's more useful for users than "click" to the "next" and "previous" link. I saw that thing on many other websites and I wonder If prestashop could do ?

Link to comment
Share on other sites

Thickbox already lets you navigation using the keyboard, but it uses the < and > keys, not the left and right arrow keys. To change it to the left and right arrow keys instead, change line 27 of js/jquery/thickbox-modified.js (in PrestaShop v1.3.1) from:

if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();[spam-filter]else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();[spam-filter]};



to:

if(keycode==27){tb_remove();}else if(keycode==39){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();[spam-filter]else if(keycode==37){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();[spam-filter]};

Link to comment
Share on other sites

  • 3 months later...
  • 3 years later...

Excuse me,

anybody can help me? Why on my PrestaShop 1.6.0.8 the arrows don't work from smarphone but only from computer? Please help me to solve this problem that make me crazy :blink: I use the default theme, with small aesthetic customizations made ​​by me. :rolleyes:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...