Skip to content

Select wich content is open for search? #3

@dallasantwerp

Description

@dallasantwerp

I have a teaser with image, title, short description and recent comment. I would like the search to only look for a match inside the title and short description. These fields i give a class 'searchable'.

filtersSelector: ".searchable"

The plugin doesn't hide an item if there is a match inside a tag that does not have the .searchable class. In the code example below, the search "Name Surename" would have a match, but this tag does not have the ".searchable" class.

What im i doing wrong?
Is there more documentation about the plugin options?

<div class="isotope-item">

   <div class="image-wrapper">
      <img src="images/default/bg3.jpg" alt="">
   </div>

   <div class="info">
      <h2 class="title searchable">Lorem Ipsum Dolor Aside kenneth</h2>
      <p class="description searchable">Nullam quis risus eget urna mollis.</small>
   </div>

   <div class="comment">
      <p>Name Surename</p>
      <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
   </div>

</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions