This is a simple requirement and I cannot make it work.
I simply want to navigate through a using arrow keys.Also I want to detect when a arrow key is pressed on a LI.However I cannot navigate with arrows- nor does my keydown event fire.
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("li,a").keydown(function () {
alert("kd");
});
});
</script>
</head>
<body>
<div>
<input type="text" />
<ul id="sbOptions_54514054" class="sbOptions" style="">
<li><a href="#-1" rel="-1">--Select one--</a></li>
<li><a href="#2" rel="2">Windows</a></li>
<li><a href="#1" rel="1">Siding</a></li>
<li><a href="#7" rel="7">Roofing</a></li>
</ul>
</div>