Minor documentation updates to input.hotkey.js (#2721)
Credit to @SebastiaanKloos
This commit is contained in:
parent
329bb6f202
commit
9c2bb8469e
|
|
@ -18,4 +18,12 @@ Allows keyboard shortcuts (hotkeys) to be bound to an element's click event.
|
||||||
Press "Shift + R" on your keyboard
|
Press "Shift + R" on your keyboard
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
## Javascript API
|
||||||
|
|
||||||
|
If you use a selector other than a button or a link, you will need to add the `hotkeyVisible` property to the hotkey config.
|
||||||
|
|
||||||
|
$('html').hotKey({
|
||||||
|
hotkey: 'ctrl+s, cmd+s',
|
||||||
|
hotkeyVisible: false,
|
||||||
|
callback: doSomething
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* JavaScript API:
|
* JavaScript API:
|
||||||
*
|
*
|
||||||
* $('html').hotKey({ hotkey: 'ctrl+s, cmd+s', callback: doSomething);
|
* $('html').hotKey({ hotkey: 'ctrl+s, cmd+s', hotkeyVisible: false, callback: doSomething });
|
||||||
*/
|
*/
|
||||||
+function ($) { "use strict";
|
+function ($) { "use strict";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue