#jquery #html #css #image #input
#jquery #HTML #css #изображение #ввод
Вопрос:
Является ли поле пустым, когда оно размыто (теряет фокус) Я хочу удалить изображение:
Вот начальный код:
$('#type').keyup(function(){
$('#image').show();
$("#type").blur( function() {
// i wanted to check here if #type field is empty as well before hiding?
$('#image').hide();
});
Ответ №1:
$("#type").blur( function() {
if (this.value === '') {
$('#image').hide();
}
});