$(...).tablesorter不是函数 [英] $(...).tablesorter is not a function

查看:71
本文介绍了$(...).tablesorter不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的插件表排序器出现问题,显然我的系统无法识别coo现有的功能,不知道是否可能与其他javascript发生冲突(我正在wordpress插件中进行更改).

I'm having problems with the plugin tablesorter apparently my system is not identifying the function coo existing, do not know if it may be some conflict with other javascript (I'm making the change in a wordpress plugin).

下面是我的代码:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="jquery.tablesorter.js"></script>
<script type="text/javascript">
(function($) {
    $('table').tablesorter();
})(jQuery);
</script>

我更改了调用js文件的方式

I changed the way i'm calling the js file

<?php
    wp_register_script( 'jquery.tablesorter.js', get_bloginfo('template_url').'/js/jquery.tablesorter.js' );
    wp_enqueue_script( 'jquery.tablesorter.js' );
?>

推荐答案

问题是提供下载文件的站点提供了一个与该插件同名的插件,只是使我感到困惑,并下载了错误的文件.

The problem was that the site which provided the download file provides a plugin with the same name as the plugin, just confusing me and downloaded the wrong file.

这篇关于$(...).tablesorter不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆