开发者

JQuery UI Tabs - loading tab with AJAX is 'breaking' a plugin

开发者 https://www.devze.com 2023-02-04 06:18 出处:网络
I have page that creates a table: http://gupii.co.uk/rap/weekTable.php and I\'m using a plugin to add a filter functionality: _http://gupii.co.uk/rap/js/mylibs/tablefilter.js

I have page that creates a table: http://gupii.co.uk/rap/weekTable.php and I'm using a plugin to add a filter functionality: _http://gupii.co.uk/rap/js/mylibs/tablefilter.js

In weekTable.php:

var theTable = $('#weekTable')
$("#filter").keyup(function() {
$.uiTableFilter( theTable, this.value );
})

This works fine when your directly on the weekTable page, but when I load the page into a JQueryUI tab and try and use the filter I get this error:

Uncaught TypeError: Object function ( selector, context ) {
  // The jQuery开发者_如何学JAVA object is actually just the init constructor 'enhanced'
  return new jQuery.fn.init( selector, context );
 } has no method 'uiTableFilter'

Whats going on here, why am I getting this error?

The page I'm trying to load into is _http://gupii.co.uk/rap/guilda.php (tab:This Week) if it helps

(apologies for posting more links than I should but I thought it would be helpful in diagnosing the problem)


Try this:

$("#filter").live("keyup", function() {
    ...

http://api.jquery.com/live/

0

精彩评论

暂无评论...
验证码 换一张
取 消