[英]How can I use two jQuery Plugins having the same name?
In a big web project I would like to use a jQuery Plugins editable
which name is the same of the exiting one but have a different behaviour. 在一个大型的Web项目中,我想使用一个
editable
的jQuery插件,该名称与现有名称相同,但具有不同的行为。
There is a clean way to rename the plugin? 有一种简洁的方法来重命名插件? Maybe using require.js?
也许使用require.js?
You can rename the plugin like this: 您可以像这样重命名插件:
<script src="jquery.js"></script>
<script src="firstplugin.js"></script>
<script>
$.fn.editableFirst = $.fn.editable;
</script>
<script src="secondplugin.js"></script>
editableFirst
should be something more meaningful to you. editableFirst
应该对你更有意义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.