Velocity JS 和 Velocity UI 的 CDN 回退
CDN fallback for Velocity JS and Velocity UI
我已经成功地设置了 jQuery 和 Velocity 的回退,但我不知道如何对 Velocity UI 做同样的事情。我可以访问
window.jQuery.Velocity
看看它是否存在,如何用 Velocity 检查是否相同 UI?
如果您查看 source of velocity UI,您会看到 /* Note: RegisterUI is a legacy name. */
评论。
所以,使用 window.jQuery.Velocity.RegisterUI
检查它是否存在。
Fiddle without velocity UI included.
控制台结果:undefined
.
Fiddle with velocity UI included
控制台结果:
(index):32 (t,a){function e(t,a,e,r){...}
我已经成功地设置了 jQuery 和 Velocity 的回退,但我不知道如何对 Velocity UI 做同样的事情。我可以访问
window.jQuery.Velocity
看看它是否存在,如何用 Velocity 检查是否相同 UI?
如果您查看 source of velocity UI,您会看到 /* Note: RegisterUI is a legacy name. */
评论。
所以,使用 window.jQuery.Velocity.RegisterUI
检查它是否存在。
Fiddle without velocity UI included.
控制台结果:undefined
.
Fiddle with velocity UI included
控制台结果:
(index):32 (t,a){function e(t,a,e,r){...}