vdw / HideSeek

A simple, mobile-friendly, yet customizable quick/live search jQuery plugin.
http://vdw.github.io/HideSeek
Apache License 2.0
429 stars 74 forks source link

search in subelement #55

Open czhang03 opened 6 years ago

czhang03 commented 6 years ago

Is it possible to search in subelement? I currently have code like this

<li class="search-item">
  <a><img class="image"/></a>
  <div class="image-description">this is the description</div>
</li>

I want to search in the .image-description with hightlight.

I can think of the following way:

<li class="search-item">
  <a><img class="image"/></a>
  this is the description
</li>

But this way makes formatting really hard.

Is there a way to do it?

maxwroc commented 5 years ago

You can add attribute to LI e.g. description="this is the description" then use the attribute option when you init plugin