![](/img/trans.png)
[英]How can I use plugins for different versions of jQuery on the same page?
[英]How can I use two jQuery Plugins having the same name?
在一個大型的Web項目中,我想使用一個editable
的jQuery插件,該名稱與現有名稱相同,但具有不同的行為。
有一種簡潔的方法來重命名插件? 也許使用require.js?
您可以像這樣重命名插件:
<script src="jquery.js"></script>
<script src="firstplugin.js"></script>
<script>
$.fn.editableFirst = $.fn.editable;
</script>
<script src="secondplugin.js"></script>
editableFirst
應該對你更有意義。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.