Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在一个大型网络项目中,我想使用一个 jQuery 插件editable,它的名称与现有的相同,但具有不同的行为。 有一种干净的方法来重命名插件吗?也许使用require.js?
editable
您可以像这样重命名插件:
<script src="jquery.js"></script> <script src="firstplugin.js"></script> <script> $.fn.editableFirst = $.fn.editable; </script> <script src="secondplugin.js"></script>
editableFirst应该是对你更有意义的东西。
editableFirst