picnet table filter not working with dynamic table
<p>Hello I´m using Picnet table filter in two tables in the same page.
One of them is dynamically generated on my js file retrieving the data from MySQL database using AJAX. 
The other one has hard-coded data.</p>

<p>The one that is dynamically generated is the one that doesn't work. (I have created the hard-coded one just to see if the problem was related to that)
At the beginning I was also generating the "thead" and "th" tags in my js function but as I was getting an error saying that "thead" was undefined I moved that code to HTML file...currently I'm only adding "tr" and "td" to "tbody" by append function...but the filters are not working. For the one that is a combo-box filter the only option is "Select.." the other options that should be generated based on column data are not.</p>

<p>Do you have an idea of what could be the problem here? 
Thanks in advance... Monica</p>

<p><strong>HTML code:</strong></p>

<pre><code>&lt;table id="tablaReservas" border="1"&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Reserva#&lt;/th&gt;&lt;th filter-type="ddl"&gt;Recurso&lt;/th&gt;&lt;th&gt;Inicio&lt;/th&gt;&lt;th&gt;Fin&lt;/th&gt;th&gt;Responsable&lt;/th&gt;&lt;th&gt;Usuario&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;

Quick Find: &lt;input type="text" id="quickfind"/&gt;&lt;a id="cleanfilters" href="#"&gt;Clear Filters&lt;/a&gt;

&lt;table id='demotable'&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th filter-type="ddl"&gt;Col1&lt;/th&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;th&gt;Col3&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Value 1&lt;/td&gt;&lt;td&gt;Value 2&lt;/td&gt;&lt;td&gt;Value 3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Value 4&lt;/td&gt;&lt;td&gt;Value 6&lt;/td&gt;&lt;td&gt;Value 8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Value 5&lt;/td&gt;&lt;td&gt;Value 7&lt;/td&gt;&lt;td&gt;Value 9&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p><strong>Javascript code:</strong></p>

<pre><code>$(document).ready(inicializar);

function inicializar(){     
traerReservas();    

var options = { additionalFilterTriggers: [$('#quickfind')], clearFiltersControls: [$('#cleanfilters')]};


$("#tablaReservas").tableFilter(options);
$("#demotable").tableFilter(options);         
}

function traerReservas(){
$.ajax({async:true,
url:"../Persistencia/procesaConsultaReservas.php",
type:"POST",
datatype:"json",
success:mostrarTabla,
error:mensajeTablaReservas, 
});
}

function mostrarTabla(data){
var d= eval('(' + data + ')');  

if (data!=0) {
for (i=0; i &lt; d.length; i++) {      
var tr= $("&lt;tr id='" + d[i].id + "' onclick=mostrarRecursos(" + d[i].id + ");&gt;" +
"&lt;td&gt;" + d[i].id + "&lt;/td&gt;" + 
"&lt;td&gt;" + d[i].nombre + "&lt;/td&gt;" + 
"&lt;td&gt;" + d[i].inicio + "&lt;/td&gt;" + 
"&lt;td&gt;" + d[i].fin + "&lt;/td&gt;" + 
"&lt;td&gt;" + d[i].responsable + "&lt;/td&gt;" + 
"&lt;td&gt;" + d[i].usuario + "&lt;/td&gt;" + 
"&lt;/tr&gt;");

$("#tablaReservas tbody").append(tr);   
}
}       
}
</code></pre>
