Closed agentphoenix closed 10 years ago
The first selector you must used is target to the input tag.
Also, you first use #searchForms
id and then #formsSearch
is that alright ?
It should look more to this
$('#searchForms input[name="q"]').quicksearch('#searchForms div', { ... }
The searchForms is actually the input field and formsSearch is the containing div. Everything is filtering like it should but the resulting HTML has the btn-group hidden (likely because the plugin recursively hides everything instead of just the containing element). Was just curious if you knew how to massage this so those children elements aren't hidden like that.
On Tuesday, November 5, 2013, Nicolas Brassard wrote:
The first selector you must used is target to the input tag.
Also, you first use #searchForms id and then #formsSearch is that alright ?
It should look more to this
$('#searchForms input[name="q"]').quicksearch('#searchForms div', { ... }
— Reply to this email directly or view it on GitHubhttps://github.com/DeuxHuitHuit/quicksearch/issues/1#issuecomment-27814569 .
Hum ok. That's a problem sometimes with greedy selectors.
Just use this selector instead: '#searchForms>div'
This will make the plugin manipulate only direct descendants of the container div.
That did the trick! I didn't realize changing the selector there would change the behavior of the plugin. Thanks for your help!
Yeah that selector is the selector of the results item. Glad we could fix it.
I'm having an issue with the above markup where QuickSearch does exactly what it's supposed to do except that it hides all children elements as well. So when the search is finished running, it shows my
h4
but the.btn-group
is hidden and can't be shown. Am I doing something wrong with this? Let me know if you need anything else from me. Any help would be appreciated!