jQuery:具有相同名称的项目/类

时间:2014-10-04 20:25:47

标签: javascript jquery html

我下载了2个插件http://luis-almeida.github.io/jPages/itemsperpage.htmlhttp://jplayer.org/ 这两个插件都使用jp-nextjp-previous名称 无论如何我能做到这一点吗? 也许我可以某种方式限制.js中的一个插件的<div>文件和另一个.js中的另一个<div>文件? 或者我可以将jp-nextjp-previous重命名为其他内容吗?

1 个答案:

答案 0 :(得分:1)

我没有在jPlayer文档http://www.jplayer.org/latest/developer-guide/#jPlayer-predefined-css-selectors中看到jp-next或jp-previous作为css选择器,但我确实看到那些列为jPages https://luis-almeida.github.io/jPages/的一部分。对于jPlayer,您可以覆盖默认的css选择器,因此如果遇到某种冲突,可以在构造函数中显示的链接中将它们重命名为docs。