Post by eddy-r3 » Wed Jul 26, 2017 5:32 am

Hey guys, hope you're well. I've setup a new search form, and it works as such :

Code: Select all

<!-- Search Form -->
<div id="searchnew"> 
	<span class="close">X</span>
	<form role="search" id="searchform" action="index.php?route=product/search" method="get">
		<input value="" name="search" type="search" placeholder="What are you looking for?">
	</form>
</div>

<script>
$(document).ready(function(){
	$('a[href="#search"]').on('click', function(event) {                    
		$('#searchnew').addClass('open');
		$('#searchnew > form > input[type="search"]').focus();
	});            
	$('#searchnew, #searchnew button.close').on('click keyup', function(event) {
		if (event.target == this || event.target.className == 'close' || event.keyCode == 27) {
			$(this).removeClass('open');
		}
	});            
});
</script>
But when ever i search, it posts to for example : index.php?search=

How would i get this to work properly? Any ideas?

Many thanks
Eddy

Active Member

Posts

Joined
Tue Jan 31, 2012 4:46 am
Who is online

Users browsing this forum: No registered users and 106 guests