我开发了一个jquery插件
$(someelment).myplugin();
工作完美。
当其他插件包含错误时显示
$(someelment).myplugin().otherplugin();
下面的案例也有效。
$(someelment).otherplugin().myplugin();
最佳答案
通常,您必须在插件函数中返回 this
(或 this.each()
),以保持插件的可链接性。如果你错过了,你可能无法调用另一个插件 - 这只是你的问题。 Here是引用。
关于jquery 不返回元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11900433/