We can even easily change the JavaScript to make the search ‘live’ so that the results automatically update with each keypress. Note that this is only a quick demo and isn’t the best way to do this. There are several jQuery plugins that you can use if you do something like this in a production app. To do this we’ll replace the JavaScript that we used to submit the form through AJAX with this.
Can someone explain why this isn't the best way to do this? And what jQuery plugins to look at?
I've added the jquery.observe_field.js plugin to add a delay but my search/sort is laggy on my production server.
DO THIS INSTEAD!!
$(document).on("click", "#products .pagination a", function() {
$.getScript(this.href);
return false;
});
Can someone explain why this isn't the best way to do this? And what jQuery plugins to look at?
I've added the jquery.observe_field.js plugin to add a delay but my search/sort is laggy on my production server.
This will make it case insensitive