javascript - How can I use two jQuery Plugins having the same name? - Stack Overflow

In a big web project I would like to use a jQuery Plugins editable which name is the same of the exitin

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.
There is a clean way to rename the plugin? Maybe using require.js?

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.
There is a clean way to rename the plugin? Maybe using require.js?

Share Improve this question edited May 13, 2012 at 15:16 underscore666 asked May 13, 2012 at 14:44 underscore666underscore666 1,7395 gold badges24 silver badges38 bronze badges 4
  • Edit the source code of one of the plugins. – Matt Ball Commented May 13, 2012 at 14:46
  • you seem to need an additional parameter to the plugin – Toni Michel Caubet Commented May 13, 2012 at 14:46
  • GIve us a link to the plugin. – Nikita Shekhov Commented May 13, 2012 at 14:50
  • stackoverflow./questions/5740974/… – Ja͢ck Commented May 13, 2012 at 14:50
Add a ment  | 

1 Answer 1

Reset to default 12

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742284313a4415052.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信