shadoks Posted January 6, 2021 Share Posted January 6, 2021 I have used this gallery from W3Schools https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp and i want to add function arrow keyboard keys to change pictures in the gallery. Can someone here help me out? Link to comment Share on other sites More sharing options...
niche Posted January 6, 2021 Share Posted January 6, 2021 What’s a function arrow keyboard key? the W3 example already has something that could be function arrow keyboard keys. Link to comment Share on other sites More sharing options...
shaili_shah Posted January 8, 2021 Share Posted January 8, 2021 Hi. We can use the keycode for it. Ex:- $(document).keydown(function(e){ if(e.keyCode === 37){ plusSlides(-1) } //for left arrow if(e.keyCode === 39){ plusSlides(1) } //for right arrow }); Hope it helps. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now