I'm geting an Uncaught TypeError: Object is not a function
on WordPress when trying to filter a table using jQuery, my code is the following one. It works when it's not under WordPress so I guess I'm missing some kind of wrapping code on some function
Thanks to anyone who can save me in here!
Code:
<script type="text/javascript">
var link = true;
//<![CDATA[
jQuery(window).load(function($) {
jQuery("#searchInput").keyup(function($) {
//split the current value of searchInput
//create a jquery object of the rows
var jo = $("#fbody").find("tr");
if (this.value == "") {
jo.show();
return;
}
//hide all the rows
jo.hide();
//Recusively filter the jquery object to get results.
jo.filter(function(i, v) {
var $t = $(this);
for (var d = 0; d < data.length; ++d) {
if ($t.is(":contains('" + data[d] + "')")) {
return true;
}
}
return false;
})
//show the rows that match.
.show();
}).focus(function() {
this.value = "";
$(this).css({
"color": "black"
});
$(this).unbind('focus');
}).css({
"color": "#C0C0C0"
});
});//]]>
</script>