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 |
||
(9 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
var andBox = " <input type='text' class='queryString' /> "; | var andBox = " <input type='text' class='queryString' /> "; | ||
$("#formSpace").html(orBox); | $("#formSpace").html(orBox); | ||
$(".queryString"). | $(".queryString").focusin(function () { | ||
$(".focused").removeClass("focused"); | $(".focused").removeClass("focused"); | ||
$(this).parent().addClass("focused"); | $(this).parent().addClass("focused"); | ||
Line 37: | Line 37: | ||
}); | }); | ||
function clearEmptyDivs(){ | function clearEmptyDivs(){ | ||
$.each($(":br"), function(){ | |||
console.log($(this).parent()); | |||
} | |||
$.each($(".query"), function(){ | $.each($(".query"), function(){ | ||
if($(this).children().length === 0){ | |||
$(this).remove(); | |||
} | |||
}); | }); | ||
} | } | ||
Line 50: | Line 55: | ||
$(this).remove(); | $(this).remove(); | ||
} | } | ||
clearEmptyDivs(); | |||
}); | }); | ||
}); | }); | ||
Line 64: | Line 70: | ||
$(this).remove(); | $(this).remove(); | ||
} | } | ||
clearEmptyDivs(); | |||
}); | }); | ||
}); | }); |