Listview with hidden items in jquery mobile

2

Using the same concept present in link

I wonder if it's possible to just list the items when I search them in searchbox. I do not want everyone to be displayed when the box is empty.

    
asked by anonymous 25.09.2015 / 21:11

1 answer

1

As in the jquery mobile documentation , just add data-filter-reveal="true" , like this:

<ul data-role="listview" data-filter="true" data-filter-reveal="true" data-filter-placeholder="Search fruits..." data-inset="true">
  <li><a href="#">Apple</a></li>
  <li><a href="#">Banana</a></li>
  <li><a href="#">Cherry</a></li>
  <li><a href="#">Cranberry</a></li>
  <li><a href="#">Grape</a></li>
  <li><a href="#">Orange</a></li>

Functional example in JSFiddle here

    
07.09.2016 / 17:57