如何使jQuery在ANT Galio浏览器上工作? [英] How do I get jQuery working on the ANT Galio browser?

查看:80
本文介绍了如何使jQuery在ANT Galio浏览器上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Web应用程序,并希望使用jQuery库来简化开发.

I'm developing a web application and would like to use the jQuery library to ease development.

此应用程序将在运行ANT Galio浏览器的嵌入式设备上运行.

This application will be run on an embedded device running the ANT Galio browser.

我要测试的设备的User-Agent字符串是:

The User-Agent string for the device I'm testing against is:

Mozilla/5.0 (compatible; ANTGalio/2.1.19.12.020.2.0.00; vxWorks-6.3)

当我尝试在此设备上使用jQuery运行页面时,它无提示地失败.基于

When I try to run a page using jQuery on this device however it fails silently. Based on the help from @Adam Terlson I've determined that jQuery 1.6.1 does not load correctly on this browser out of the box based on the fact that neither $ nor jQuery is defined after loading the library (both are defined testing the page in Firefox).

有人在ANT Galio浏览器中使用jQuery有任何经验吗?可以运行它还是我不走运?

Does anybody have any experience using jQuery in the ANT Galio browser? Is it possible to get it running or am I out of luck?

推荐答案

使用ANT Galio上的任何现有库(尤其是2.x版)是个坏主意. jQuery之类的库涵盖了跨浏览器的兼容性(您不需要),并在顶部放置了易于使用的API.性能是第二件事.

It is bad idea to use any existing libraries on ANT Galio, especially ver 2.x. Libraries like jQuery cover cross-browsers compatibility (you don't need it) and put easy to use API on the top. Performance is the second thing.

jQuery使用极慢的选择器引擎Sizzle.我认为这是您无法在其中使用jQuery的主要原因.

jQuery uses extremely slow selector engine Sizzle. I think this is main reason why you wont be able to use jQuery there.

例如,使用Sizzle访问DOM元素的速度比纯JS慢大约100倍.

For example accessing DOM elements using Sizzle is about 100 times slower then pure JS.

恕我直言,ANT Galio浏览器编程的唯一方法是使用JavaScript.

IMHO only one way to programming for ANT Galio browser is using JavaScript.

这篇关于如何使jQuery在ANT Galio浏览器上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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