Attaching listener to selector, getting TypeError
When I do this in the debugger, I get an object no problem: $(".ui-column-filter").get(0)
However, when I try to use the same selector in the context below,
I get this error: TypeError: $(...).get(...) is undefined
What am I doing wrong? I tried with and without the ready.
Please advise.
<script>
$(document).ready(function () {
$(".ui-column-filter").get(0).keydown(function() {
updateTotals();
});
$(".ui-column-filter").get(1).keydown(function() {
updateTotals();
});
$(".ui-column-filter").get(2).keydown(function() {
updateTotals();
});
});
</script>