gpt4 book ai didi

jquery-ui - firefox 上的错误 : $. 小部件不是功能

转载 作者:行者123 更新时间:2023-12-04 05:26:36 24 4
gpt4 key购买 nike

我在页面上的 Jquery UI 中有一些多选框,它们在 Chrome 和 Safari 中运行良好,但由于某种原因在 Firefox 中运行良好......当我在 Firefox 中加载错误控制台时,我看到:

Error: $.widget is not a function
Source File: http://localhost:3000/javascripts/jquery.multiselect.js?1302660373
Line: 563

任何想法为什么?

编辑:该行本身在 open 函数中,它说“//对初始化后的选项更改使用react”
    // open the menu
open: function(e){
var self = this,
button = this.button,
menu = this.menu,
speed = this.speed,
o = this.options;
widget: function(){
return this.menu;
},

// react to option changes after initialization
_setOption: function( key, value ){
var menu = this.menu;

switch(key){
case 'header':
menu.find('div.ui-multiselect-header')[ value ? 'show' : 'hide' ]();

最佳答案

我假设您正在使用 jQuery Multiselect plugin ... 这取决于 jQuery UI。

听起来您没有包含足够的 jQuery UI 库,或者根本没有包含。如果你构建一个 custom download,你需要包含 jQuery UI 的核心部分(包括 Widget ) .或者只是下载整个 jQuery UI 并包含它。

关于jquery-ui - firefox 上的错误 : $. 小部件不是功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5775810/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com