<script>
$('.menu-item-search, .glyphicon-remove').click(function() {
$('.jqeury-test-form').slideToggle(200);
});
</script>
$(document).click(function(e) {
var $target = $(e.target);
if ($target.hasClass('menu-item-search') || $target.hasClass('glyphicon-remove')) {
$('.jqeury-test-form').slideToggle(200);
} else if(!$target.parents("div").hasClass('jqeury-test-form')) {
$('.jqeury-test-form').slideUp(200)
}
});