【问题标题】:Meteorjs HTML table filter with JqueryMeteorjs HTML表格过滤器与Jquery
【发布时间】: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


    【解决方案1】:

    尝试在 jQuery 的文档就绪方法中使用 ddTableFilter()

    $(document).ready(function(){
    
       jQuery('#table_format').ddTableFilter();
    
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-08-11
      • 2012-02-24
      • 2010-12-17
      • 2017-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多