Meteorjs使用Jquery的HTML表格过滤器

Meteorjs使用Jquery的HTML表格过滤器

问题描述:

我想使用MongoDB数据库过滤Meteor中的HTML表格。Meteorjs使用Jquery的HTML表格过滤器

我有一个模板来显示(每个)我在HTML表中的所有游乐设施。

我想实现一个jQuery选择过滤器来过滤表。

<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的文件准备好方法

$(document).ready(function(){ 

    jQuery('#table_format').ddTableFilter(); 

}); 
+0

我忘了是方法使用ddTableFilter(),但它不工作也不 – artcore