DeuxHuitHuit / quicksearch

A jQuery plugin for searching through DOM Elements quickly
https://www.npmjs.org/package/jquery.quicksearch
Other
135 stars 35 forks source link

Quicksearch 2.0.2 hides the table heading when used #4

Closed lewismmark closed 10 years ago

lewismmark commented 10 years ago

I am using a gridview inside of an update panel. Earlier version of quicksearch worked fine on the initial load of the table; however, when the table was updated inside of the update panel quicksearch quite working. Your version of quicksearch works fine when the panel is updated; however, your version hides the table headings.

nitriques commented 10 years ago

When talking about a gridview, you are referring to ASP.NET gridview ?

Can you give me more exemple (like the html and javascript you wrote)

lewismmark commented 10 years ago

Did something change? Yesterday you Quicksearch 2.0.2 was working with an ASP.Net gridview and now today it is generating the error listed below

[cid:image001.png@01CF1E71.E69A8DE0]

Any help you can give would be greatly appreciated.

From: Nicolas Brassard [mailto:notifications@github.com] Sent: Thursday, January 30, 2014 11:58 AM To: DeuxHuitHuit/quicksearch Cc: Mark Lewis Subject: Re: [quicksearch] Quicksearch 2.0.2 hides the table heading when used (#4)

When talking about a gridview, you are referring to ASP.NET gridview ?

Can you give me more exemple (like the html and javascript you wrote)

— Reply to this email directly or view it on GitHubhttps://github.com/DeuxHuitHuit/quicksearch/issues/4#issuecomment-33714117.

nitriques commented 10 years ago

Can't see your image. Please re-post.

lewismmark commented 10 years ago

Try again.

From: Nicolas Brassard [mailto:notifications@github.com] Sent: Friday, January 31, 2014 10:51 AM To: DeuxHuitHuit/quicksearch Cc: Mark Lewis Subject: Re: [quicksearch] Quicksearch 2.0.2 hides the table heading when used (#4)

Can't see your image. Please re-post.

— Reply to this email directly or view it on GitHubhttps://github.com/DeuxHuitHuit/quicksearch/issues/4#issuecomment-33819494.

nitriques commented 10 years ago

Still can't see it.

lewismmark commented 10 years ago

I converted to a pdf file and attached it to my email. If you cannot see it please tell the format it needs to be in. Thank you for your help

From: Nicolas Brassard [mailto:notifications@github.com] Sent: Friday, January 31, 2014 10:59 AM To: DeuxHuitHuit/quicksearch Cc: Mark Lewis Subject: Re: [quicksearch] Quicksearch 2.0.2 hides the table heading when used (#4)

Still can't see it.

— Reply to this email directly or view it on GitHubhttps://github.com/DeuxHuitHuit/quicksearch/issues/4#issuecomment-33820389.

nitriques commented 10 years ago

stop replying by email and just upload it via github web interface. Attachment can't be uploaded via email.

lewismmark commented 10 years ago

Lets start again. Currenly I am getting a Microsoft JScript runtime error: Object doesn't support property or method 'on' . It errors on this line }(jQuery, this, document)); The search box in a simple ASP text box and I am searching an ASP gridview. I am using the jQuery command $('input#txtCrewList').quicksearch('table#gvCrewList tbody tr'); to start the search. Yesterday it was working. Today I get the runtime error.

nitriques commented 10 years ago

Please make sure to use jquery 1.9+.

on is the new bind

lewismmark commented 10 years ago

Using jquery 1.9.1 did the trick. Thank you much. Now back to the original problem. The data in the gridview is a listing of jobs by work crew for a given week Sunday thru Saturday. When the forms first comes up it shows jobs for the current week and the quicksearch works. The guidview is in an update panel. When i change the date of the week I want to see, the quicksearch not longer works because the whole did not refreash. How do I fix that? Again thank you

nitriques commented 10 years ago

the quicksearch not longer works because the whole did not refresh

that's 100% normal, since the plugin is caching the DOM elements. You should use the update panel's script manager in order to recall the plugin each time the update panel is updating.

Something like this should work

var target = $('input#txtCrewList');
// delete already attached events, just to be sure
target.off($.quicksearch.defaults.options.bind);
// recall the plugin with the new DOM elements
target.quicksearch('table#gvCrewList tbody tr');
nitriques commented 10 years ago

You should also consider updating to jquery 1.10.2

lewismmark commented 10 years ago

Got it to work. I updated to 1.10.2. Thank you for your help

nitriques commented 10 years ago

you're welcome!