Jquery mobile jquery移动数据表填充器
在这里,我使用smarty在头部部分添加所有jquery移动库…但我不能添加Filter功能。。我不知道我的代码出了什么问题。。我想在我的数据表中添加Filter选项Jquery mobile jquery移动数据表填充器,jquery-mobile,Jquery Mobile,在这里,我使用smarty在头部部分添加所有jquery移动库…但我不能添加Filter功能。。我不知道我的代码出了什么问题。。我想在我的数据表中添加Filter选项 {extends file="./main.tpl"} {block name=head} <meta name=viewport content="user-scalable=no,width=device-width" /> <link rel="stylesheet" href="http://co
{extends file="./main.tpl"}
{block name=head}
<meta name=viewport content="user-scalable=no,width=device-width" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
{/block}
{block name=body}
<table cellspacing="0" class="ui-responsive table-stroke" data-role="table" id="sample" data-mode="columntoggle" data-top-container="true" data-bottom-container="true" data-inset="true" data-filter="true" align="center" border="1">
<h2 align="center"><b>Loan List</b></h2>
<tr>
<th align="center">Party</th>
<th align="center">Phone Number</th>
<th align="center">Date</th>
<th align="center">Amount</th>
<th align="center">Interst</th>
<th align="center">Given Amount</th>
</tr>
{section name="sec" loop=$loanListArray}
<tr>
<td align="left">{$loanListArray[sec].partyName}</td>
<td align="left">{$loanListArray[sec].phoneNumber}</td>
<td align="left">{$loanListArray[sec].loanDate|date_format:"%e-%m-%Y"}</td>
<td align="right">{$loanListArray[sec].amount}</td>
<td align="right">{$loanListArray[sec].interst}</td>
<td align="right">{$loanListArray[sec].givenAmount}</td>
</tr>
{/section}
<tr>
<th align="right" colspan="3">Total :</th>
<th>{$totalAmm}</th>
<th>{$totalInt}</th>
<th>{$totalgiven}</th>`enter code here`
</tr>
</table>
{/block}
{extends file=“./main.tpl”}
{块名=头}
{/block}
{block name=body}
贷款清单
聚会
电话号码
日期
数量
兴趣
给定数量
{section name=“sec”循环=$loanListArray}
{$loanListArray[sec].partyName}
{$loanListArray[sec].phoneNumber}
{$loanListArray[sec].loanDate |日期_格式:“%e-%m-%Y”}
{$loanListArray[sec].amount}
{$loanListArray[sec].interst}
{$loanListArray[sec].givenAmount}
{/section}
总数:
{$totalAmm}
{$totalInt}
{$totalgiven}`在此处输入代码`
{/block}
表定义需要
和
部分。根据JQM文档:
“确保在表中包含thead和tbody元素”。希望有帮助