【发布时间】:2017-04-09 22:00:02
【问题描述】:
我想使用 MongoDB 数据库在 Meteor 中过滤我的 HTML 表。
我有一个模板可以在 HTML 表中显示(每个)我的所有游乐设施。
我想实现一个 jquery selected filter 来过滤表格。
<template name="rides">
<div class="table-responsive">
<table id="table_format" class="table table-striped">
<thead>
<tr>
<th>Abfahrtsort</th>
<th>Zielort</th>
<th>Gesucht werden</th>
<th>Datum</th>
<th>Plätze</th>
<th>Kommentar</th>
</tr>
</thead>
<tbody>
{{#each rides}}
<tr>
<td>{{departure}}</td>
<td>{{destination}}</td>
<td>{{searching}}</td>
<td>{{dateandtime}}</td>
<td>{{seats}}</td>
<td>{{comment}}</td>
<td>{{#if currentUser}}<button class="edit">Bearbeiten</button>{{/if}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
<script src="jquery-1.11.3.min.js"></script>
<script src="ddtf.js"> </script>
<script>
jQuery('#table_format').ddTableFilter();
</script>`
它不会在表格中显示我的数据,也不会显示过滤器。
【问题讨论】:
标签: jquery html meteor html-table filtering