$(document).ready(function() {
$("#depart").keyup(function(){
var to = $("input[name='depart']").val();
if(to != 0)
{
$("#toAirport").css({
"background-image": "url('http://www.test.com/tick.png')"
});
} else {
$("#toAirport").css({
"background-image": "none"
});
}
});
});
The problem is, it displays the tick image to early (while the user is still typing). To delay it, I was going to change it to a blur event. Is there anyway I can create a blur event above without having to do anything to the form element?

New Topic/Question
Reply



MultiQuote





|