SharePoint InstantListFilter

Jul 11 at 7:28 AM
Hi,
I use IE11, I posted the code below. it works well in Google Chrome, but IE gives a bit of a trouble. Though the text in the search box is cleared when “x” is clicked, it doesn’t refresh the results. it still shows the filtered result. it works well when I use backspace and delete the search text. How should I fix it. can anyone help

<script src="http://www.google.com/jsapi"></script><script>
google.load("jquery", "1.3.2");

google.setOnLoadCallback(function() {

$(document).ready(function()
{
            jQuery.extend(jQuery.expr[':'], {
containsIgnoreCase: function(a,i,m) {return (a.textContent||a.innerText||jQuery(a).text()||'').toLowerCase().indexOf((m[3]||'').toLowerCase())>=0}
});
            $("table.ms-listviewtable tr.ms-viewheadertr").each(function()
            {
                            if($("td.ms-vh-group", this).size() > 0)
                            {
                                            return;  
                            }

                            var tdset = "";

                            var colIndex = 0;

                            $(this).children("th,td").each(function()
                            {
                                            if($(this).hasClass("ms-vh-icon"))
                                            {
                                                            // attachment
                                                            tdset += "<td></td>";
                                            }
                                            else
                                            {
                                                            // filterable
                                                            tdset += "<td><input type='search' class='vossers-filterfield' filtercolindex='" + colIndex + "' /></td>";                                                            
                                            }
                                            colIndex++;

                                                                            });

                            var tr = "<tr class='vossers-filterrow'>" + tdset + "</tr>";

                            $(tr).insertAfter(this);
            });           


            $("input.vossers-filterfield")
                            .css("border", "1px solid #7f9db9")
                            .css("width", "100%")
                            .css("margin", "2px")
                            .css("padding", "2px")
                            .keyup(function()
                            {                                              
                                            var inputClosure = this;



                                            window.VossersFilterTimeoutHandle = setTimeout(function()
                                            {
                                                            var filterValues = new Array();

                                                            $("input.vossers-filterfield", $(inputClosure).parents("tr:first")).each(function()
                                                            {                                                              
                                                                            if($(this).val() != "")                                                        
                                                                            {
                                                                                            filterValues[$(this).attr("filtercolindex")] = $(this).val();
                                                                            }
                                                            });                           


                                                            $(inputClosure).parents("tr.vossers-filterrow").nextAll("tr").each(function()
                                                            {
                                                                            var mismatch = false;

                                                                            $(this).children("td").each(function(colIndex)
                                                                            {
                                                                                            if(mismatch) return;

                                                                                            if(filterValues[colIndex])
                                                                                            {
                                                                                                            var val = filterValues[colIndex];

                                                                                                            // replace double quote character with 2 instances of itself
                                                                                                            val = val.replace(/ii/g, String.fromCharCode(34) + String.fromCharCode(34));                                                                                                          

                                                                                                            if($(this).is(":not(:containsIgnoreCase('" + val + "'))"))
                                                                                                            {
                                                                                                                            mismatch = true;
                                                                                                            }                                                                                              
                                                                                            }
                                                                            });

                                                                            if(mismatch)
                                                                            {
                                                                                            $(this).hide();
                                                                            }
                                                                            else
                                                                            {
                                                                                            $(this).show();
                                                                            }                              
                                                            });                                                           

                                            }, 250);
                            });
});

});</script>