'event.ctrlKey is not functioning in IE
$('a').click(function(event){
if( event.ctrlKey || event.target.href){
return false;
}
});
Working fine in Firefox and Chrome, but not in IE. Please help in this.
Solution 1:[1]
Why don't you use event.keyCode instead?
use it as:
if( (event.keyCode == 17 ) || event.target.href ){
return false;
}
Reference: Javascript Char Codes
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alaa Badran |
