在batman.js中使用jQuery [英] Using jQuery with Batman.js

查看:56
本文介绍了在batman.js中使用jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Batman.js,我想将jQuery用于一些标准的Ajax和动画功能。

I'm experimenting with Batman.js and I'd like to use jQuery with it for some standard Ajax and animation features.

我正在关注安装位于 http://batmanjs.org/download.html 并在页面底部的说明关于如何使用jQuery适配器的简短描述,我真的不明白如何设置。

I'm following the installation instructions located at http://batmanjs.org/download.html and at the bottom of the page there's a short description about how to use the jQuery adapter that I do not really understand how to setup.

我看到 https://github.com/Shopify/batman/tree/master/lib 但我不确定他们在哪里去以及如何设置它。任何有关使用jQuery与Batman.js正确方法的建议表示赞赏。

I see some of the files listed at https://github.com/Shopify/batman/tree/master/lib but I'm not sure where they go and how to set that up. Any advice on using jQuery with Batman.js the right way is appreciated.

谢谢。

推荐答案

Batman依靠适配器实现 Batman.Request 并帮助查询DOM。要将Batman与jQuery一起使用,请包含库Batman.jQuery适配器:

Batman depends on adapters to implement Batman.Request and to help with querying the DOM. To use Batman with jQuery, include both libraries and the Batman.jQuery adapter:

<script src='batman.js'></script>
<script src='jquery.js'></script>
<script src='batman.jquery.js'></script>
<script src='your_app.js'></script>
<script>
  YourApp.run()
</script>

这篇关于在batman.js中使用jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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