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:
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
Post a Comment