Simple but stupid
Simple but stupid
Hey Guys,
I am making a jQuery keyboard shortcut to open a url.
-
<script type="text/javascript">
var isCtrl = false;$(document).keyup(function (e) {
if(e.which == 18) isCtrl=false;
}).keydown(function (e) {
if(e.which == 18) isCtrl=true;
if(e.which == 76 && isCtrl == true) {
alert('Keyboard shortcuts + JQuery are even more cool!');
return false;
}
});
</script>
This is what i have so far, works fine with ALT+L and it opens up the Alert box with the text, however i need to change the alert code.
-
alert('Keyboard shortcuts + JQuery are even more cool!');
to make it open this link: <a href="#dialog1" name="modal">Login</a>
Any one willing to help me out ?.