javascript - How to obtain value of textbox within jQuery Mobile Listview control -


this easy question, i'm getting suspicion design might need more thought. have listview control such:

<ul id="txtto" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="to:"></ul> 

since data-filter property true, control creates textbox filtering:

enter image description here

i need know how obtain value of textbox. i've tried both $("#txtto").val() , $("#txtto").text() both return "".

nothing in docs seem indicate how obtain current filter value, , i've dug through properties in chrome debugger no avail. ideas?

i have sinking suspicion answer use own <input>, listen whenever value changes, , update separate listview control instead , not use data-filter.

i found code

<form class="ui-filterable">      <input id="filterbasic-input" data-type="search">  </form>  <ul data-role="listview" data-input="#filterbasic-input" data-filter="true">      <li>acura</li>      <li>audi</li>      <li>bmw</li>      <li>cadillac</li>      <li>ferrari</li>  </ul>

on jquery mobile site here: http://demos.jquerymobile.com/1.4.0/filterable/

will work you? set input listview, can text or set text. need include data-input attribute on ul.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -