$("element").keyup(function(){
.....
})
Here is the code to trigger events on keyup. Here is the code .
<script>
$(document).ready(function() {
$(document).keyup(function(){
alert('hi');
});
})
</script>
DEMO of keyup Event
<script>
$(document).ready(function() {
$(document).keyup(function(){
//alert('hi');
$('#d1').html("Event : keyup() , pressed key : "+event.which);
});
})
</script>
<script>
$(document).ready(function() {
$("#d1").keyup(function(){
var str_length = $("#d1").val().length;
$('#d2').html(str_length);
});
})
</script>
Event ReferenceDEMO of counting number of chars entered inside textarea
Most Popular JQuery Scripts | |
1 | Two dependant list boxes |
2 | Calendar with Date Selection |
3 | Data change by Slider |
4 | Show & Hide element |