Contents tagged with submit

  • jQuery Mobile Search Filter Bar - Programmatically Search

    I ran across another issue when trying to filter a list using jQuery Mobile's Filtered List (http://jquerymobile.com/demos/1.0/docs/lists/lists-search.html) The functionality itself is really nice, jQuery framework does all the heavy lifting for you. All you need to do is create a <UL> or <OL> and add the attributes data-role="listview" data-filter="true" to the tag and your off. The problem I encountered, I wanted to programmatically execute the filter. On my page I had a number of re-populated search terms that I wanted to provide the users. Clicking on the button would pop the search string into the search input box. The problem was, adding the search string to the box wasn't enough. It required some event to trigger in order to filter the list down. After digging around and trial and error I found that a simple keyup event in the search box worked.