Hello,
i replace the submit url from the search form with this jquery snippet:
<script type="text/javascript">
$(document).ready(function() {
$('.search-form').submit(function() {
window.location.href = "/search-" + $('.search-form input:text').val() + "-" + "keyword"+ "-"+ "keyword2/" + $('.search-form input:text').val() + ".html";
return false;
});
});
</script>
work's fine and turns the url into a nice seo cleaned url.. but how can I replace the space, when someone types in "search me" the url looks like /search-search me-keyword-keyword2/search me.html with spaces.. but with + or - it would look much better.. I know str_replace from php, but no code for jquery.. thank you!!