$(selector).blur()
<script>
$(document).ready(function() {
$('#t1').blur(function(){
var str1=$('#t1').val();
if(str1.length<1){
$('#d1').html('Please enter name');
}
});
$('#t2').blur(function(){
var str2=$('#t2').val();
if(str2.length<1){
$('#d1').html('Please enter email ');
}
});
})
</script>
DEMO of Blur Event
Most Popular JQuery Scripts | |
1 | Two dependant list boxes |
2 | Calendar with Date Selection |
3 | Data change by Slider |
4 | Show & Hide element |