需要js jquery插件 [英] require js jquery plugins

查看:46
本文介绍了需要js jquery插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否必须为我试图在require.js中使用的每个jQuery插件编写包装器?我无法使用订单插件他们仍然给我依赖于jQuery的错误。

Do I have to write wrappers for each jQuery plugin I am trying to use in require.js? I can't user the order plugin they still give me the error that they depend on jQuery.

谢谢

推荐答案

RequireJS 2.0有一个 shim 选项,允许您使用较旧的非AMD脚本作为模块 - http://requirejs.org/docs/api.html#config-shim

RequireJS 2.0 has a shim option that allows you to use older non-AMD scripts as modules - http://requirejs.org/docs/api.html#config-shim

这篇关于需要js jquery插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆