[fix] [minor] product search to search on textbox keypress

This commit is contained in:
Akhilesh Darjee 2013-11-19 12:26:46 +05:30
parent a2fbe5cfd2
commit 5a1a22e907

View File

@ -13,17 +13,18 @@
<script> <script>
// redirect to product search page // redirect to product search page
$(document).ready(function() { $(document).ready(function() {
$('.dropdown-toggle').dropdown() $('.dropdown-toggle').dropdown();
$("#btn-product-search").click(function() { $("#btn-product-search").click(function() {
var txt = $("#product-search").val(); var txt = $("#product-search").val();
if(txt) { if(txt) {
window.location.href="product_search.html?q=" + txt; window.location.href="product_search?q=" + txt;
} }
return false; return false;
}); });
$("#product-search").keypress(function(e) { $("#product-search").keypress(function(e) {
if(e.which==13) $("#product-search-btn").click(); if(e.which==13) $("#btn-product-search").click();
}) });
}) $(".form-search").on("submit", function() { return false; });
});
</script> </script>
</div> </div>