Hi all,
is it possible to put a keyboard key on my HTML5 skin buttons?
Now I have to click on next or previous button to jump in the next or previous button.
But would be nice to use left or right cursor button as well.
Cursor button shortcut for next or previous button
Re: Cursor button shortcut for next or previous button
You can put some jQuery into the skin that should achieve this, I've tested it locally in devtools but not in an actual build however..
This will click the next topic button if you press the right arrow and click the previous topic button if you press the left arrow.
Code: Select all
$(document).keydown(function(e) {
if (e.which == 39) {
$(".next-topic-button").click();
} else if (e.which == 37) {
$(".previous-topic-button").click();
}
});
Re: Cursor button shortcut for next or previous button
Hi Alex,
thanks for the idea. Unfortunatelly does it work only once to the previous and once to the next topic.
My idea was to read the entire topics by using the keyboard without mouse .
Maybe something with history.back() and history.forward() event, but I don´t know how coding this
thanks for the idea. Unfortunatelly does it work only once to the previous and once to the next topic.
My idea was to read the entire topics by using the keyboard without mouse .
Maybe something with history.back() and history.forward() event, but I don´t know how coding this
Re: Cursor button shortcut for next or previous button
I tested putting it in <script> tags in the head of my template page that has the buttons and it works fine for me on every page, perhaps try that?
-
- Propellus Maximus
- Posts: 613
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Cursor button shortcut for next or previous button
Hi Matze,
You might want to ask GPT or Phind.com (my preferred helper) for coding assistance. Either AI may not provide code that works on the first attempt, but I've had excellent results with CSS/JS coding from both. Phind is much more current, too.
You might want to ask GPT or Phind.com (my preferred helper) for coding assistance. Either AI may not provide code that works on the first attempt, but I've had excellent results with CSS/JS coding from both. Phind is much more current, too.
Trent.
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!
Re: Cursor button shortcut for next or previous button
Thank you, thats great