Author Topic: Live searching virtuemart  (Read 4496 times)

psm

  • Jr. Member
  • **
  • Posts: 67
Live searching virtuemart
« on: June 18, 2013, 22:02:49 pm »
Dear all,
could you please advice me, how I can modify this code. I want to make live searching to joomla, but I want table of products to be showed from begining. Now, there is problem, that if I fill some letter to search box, it shows me data just after it. I want all data to be showed even on begining before I fill some letter.

Thank you very much,

Here is code:
Code: [Select]
/*quick search*/
$(document).ready( function() {
$(".result").hide();

$("#key").keyup( function(event){
var key = $("#key").val();

if( key != 0){
$.ajax({
type: "POST",
data: ({key: key}),
url:"quicksearch.php",
success: function(response) {
$(".result").slideDown().html(response);
}
})

}else{

$(".result").slideUp();
$(".result").val("");
}
 })