Widget:KeywordSearch: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 30: | Line 30: | ||
$(this).parent().addClass("focused"); | $(this).parent().addClass("focused"); | ||
$(".queryString").focusout(function () { | $(".queryString").focusout(function () { | ||
if ($(this).val().length <= 1) { | |||
$(this).remove(); | |||
if($(this).parent().length === 0){ | |||
$(this).parent().remove(); | |||
} | |||
} | |||
}); | }); | ||
}); | }); | ||
Line 61: | Line 64: | ||
if ($(this).val().length <= 1) { | if ($(this).val().length <= 1) { | ||
$(this).remove(); | $(this).remove(); | ||
if($(this).parent().length === 0){ | |||
$(this).parent().remove(); | |||
} | |||
} | } | ||
}); | }); |