Post by jllwton » Sat Mar 29, 2014 7:32 pm

I'm trying to fix a minor problem at http://www.treasuretroveworcester.com. In the search box at the top of the page, you have to click the magnifying glass icon to initiate the search. Pressing the return key doesn't work. Apparently this is a big deal ::)

Pressing return on a search on the actual search page works fine.

Can anybody point me in the right direction, please?

Many thanks

Newbie

Posts

Joined
Fri Aug 19, 2011 8:04 pm

Post by dolrichfortich » Sat Mar 29, 2014 7:59 pm

Add this on your template footer.tpl, just above "</body>" tag.

Code: Select all

<script>
$('#search input[name=search]').keypress(function(e) {
    if(e.which == 13) {
        $('#search .button-search').trigger('click');
    }
});
</script>

Opencart Options Pro, Reward Points For Review, DISQUS Comment Form,
Dolrich Fortich - Freelance web developer

Image


User avatar
New member

Posts

Joined
Thu Aug 05, 2010 8:09 pm
Location - Philippines

Post by jllwton » Sun Mar 30, 2014 12:15 am

Perfect. Thank you ;D ;D ;D ;D

Newbie

Posts

Joined
Fri Aug 19, 2011 8:04 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 122 guests