input box not working in firefox
===

I am trying to have a basic filter when someone puts a word into a input box and list items hide on click, this is working fine in chrome but in firefox it is not working at all. 

html:

    <form ACTION="#" id="navsform" class="my-search">
    <input id="formwidth" type="text" name="query" placeholder="Search...">
    <input type="submit" class="my-button" value="Search" onclick="query_searchvar()"></form>

javascript:

    function query_searchvar()
    {
    var searchquery=document.navsform.query.value.toLowerCase();
    if(searchquery == '')
    {alert("No Text Entered");
    }
    var queryarray = searchquery.split(/,|\s+/);
    
    event.preventDefault();
    
    
    $('li').each(function() {
      var searchtags = $(this).attr('data-searchtags');
      //alert(searchtags);
      var searcharray = searchtags.split(',');
    //alert(searcharray);
    var found = false;
    for (var i=0; i<searcharray.length; i++)
        if ($.inArray(searcharray[i], queryarray)>-1) {
            found = true;
            break;
        }
    
    if (found == true )
      {
    
     $(this).show("normal");
      }
    else {
    $(this).hide("normal");
    }
    });
    }

Any help much appreciated. Thank you. 
