I want to execute the command ctrl + 0 on page load. Here is what I have so far:
$( document ).ready(function() {
var press = jQuery.Event("keypress");
press.ctrlKey = true;
press.which = 48;
trigger(press);
});
This is not firing ctrl+0 and is also breaking another div on the page.
What am I doing wrong and how do I fix it?