JQuery Mobile:带有动态搜索过滤器的列表

时间:2012-11-27 03:15:16

标签: javascript css jquery-mobile

我开始使用JQuery Mobile 1.2.0。我遇到了listviewwhen I followed the guide to get started.I used the sample code in my html, but the list view had a little problem, like: enter image description here

As you can see, the search field clips with the list view. However it runs well in JQuery website. So I'm a little lost and have no idea what is missing.

Could anyone help me?

Edited: Source code

<ul data-role="listview" data-inset="true" data-filter="true">
<li><a href="#">Acura</a></li>
<li><a href="#">Audi</a></li>
<li><a href="#">BMW</a></li>
<li><a href="#">Cadillac</a></li>
<li><a href="#">Ferrari</a></li></ul>
的问题

1 个答案:

答案 0 :(得分:0)

Here's一个工作示例:

<div data-role="page" id="some-page">
    <div data-role="header">
        <h1>Warning</h1>
    </div>
    <div data-role="content">    
        <ul data-role="listview" id="thumbs" data-filter="true">
            <li><a href="index.html">Adam Kinkaid</a></li>
            <li><a href="index.html">Alex Wickerham</a></li>
            <li><a href="index.html">Avery Johnson</a></li>
            <li><a href="index.html">Bob Cabot</a></li>
            <li><a href="index.html">Caleb Booth</a></li>
            <li><a href="index.html">Christopher Adams</a></li>
            <li><a href="index.html">Culver James</a></li>
        </ul>
    </div>
</div>