I want to generate keyup event with <th>
. If i click in <th>
click event is populating there but my requirement is generate event when i release CTRL key pressed with click in <th>
area I am using the following code
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
</head>
<body>
<table border="2">
<th>rollno</th>
<th>name</th>
<tr>
<td>4567</td>
<td>john</td>
</tr>
</table>
</body>
<script>
$('th').click(function(){
alert("yes its working");
});
</script>
<script>
$('th').on('keyup', function(e) {
if (e.keyCode ==17)
{
alert("OOps! ctr+click release not working");
}
});
</script>
</html>