Is it possible to create an auto key press event? I want to flip a book once automatically after refreshing the site?
Thanks in advance!
Is it possible to create an auto key press event? I want to flip a book once automatically after refreshing the site?
Thanks in advance!
This will do it:
$(document).ready(function() {
var e = $.Event('keydown', { keyCode: 39 });// right arrow key
$(document).trigger(e);
});
References:
This solved the problem:
$(window).load(function() {
var e = $.Event('keydown', { keyCode: 39 });// right arrow key
setTimeout(function() {
$(document).trigger(e);
}, 1000);
});
Many thanks!