Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only a certain element searchable? #2

Closed
AlecRust opened this issue Apr 4, 2012 · 1 comment
Closed

Only a certain element searchable? #2

AlecRust opened this issue Apr 4, 2012 · 1 comment

Comments

@AlecRust
Copy link

AlecRust commented Apr 4, 2012

Great plugin! I'm using it on a list with this markup:

<ul class="filter-results">
    <li>
        <h2>Title</h2>
        <p>Description and stuff.</p>
    </li>
<ul>

I'm targeting .filter-results li in the main function call on the page.

Problem is in this scenario both the title and the description are searchable. I want only the title to be searchable.

Changing the JavaScript to target the .searchable class and applying that to only the title <h2> doesn't seem to work - I get blank results (despite the results size variable working correctly).

Surely this is a commonly desired feature? Am I doing something wrong or is this a good enhancement for this plugin?

@AlecRust
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant