iPhone/Android/BlackBerry 上的 jQuery (jQuery on iPhone/Android/BlackBerry)


問題描述

iPhone/Android/BlackBerry 上的 jQuery (jQuery on iPhone/Android/BlackBerry)

I don't have any of the devices to test at the moment. I guess I'll start using the emulators later on.

We're looking to offer mobile support. I was wondering how jQuery or even javascript renders in their respective browsers. 

What works? What doesn't? Any tips? Advice?

‑‑‑‑‑

參考解法

方法 1:

I've used jQuery on iPhone. Remember that Mobile Safari is not an officially supported browser for jQuery. But it's close enough to Safari that most things work.

If I recall correctly, mousedown event doesn't happen until the mouseup happens, at which point both fire. My guess is that most things will work, but you need to test everything carefully.

My experience is that changing the DOM is unexpectedly slow. Things that fly on the emulator can drag on the device. (You mentioned you'd be using emulators‑‑do NOT trust performance you get on them.)

jQuery might be overkill. I ended up relying on XUI, which gives you a lot of the jQuery stuff, but is much more lightweight, and also gives you touch events. http://github.com/brianleroux/xui/tree/master


ppk has begun testing mobile browsers. http://www.quirksmode.org/m/w3c_core.html

方法 2:

Came across this today and remember reading your post on here.  Thought I would include the link for anyone that's interested in this jQuery project for the iPhone:

http://jqtouch.com/

Haven't had a chance to try it out yet, but it seems to replicate a lot of the iPhone interface elements within the browser.  I think it shows some promise, and uses a lot of the jQuery conventions.

方法 3:

Do not expect jquery to work much at all on Blackberry. The default browser is very limited in terms of JavaScript and page rendering. 

Though opera on Blackberry might be a different story...

方法 4:

I use JQTouch on i‑phone a lot and think its great. It does not work on Android. JQuery is very, very slow (Android 2.0 HTC Desire and Legend) and as such JQTouch suffers. Also, animations are very poor, worse than WebKit nightly on my Mac, which are fairly flickery... You get the idea but nothing as smooth as the i‑phone. I really like the Android platform and JQTouch, but they don't sit well together.

G*

方法 5:

You can use this new lib: http://www.sencha.com/

(by Brian LiangNosrednaTom MerrihewAtariPeteglennstarYoo)

參考文件

  1. jQuery on iPhone/Android/BlackBerry (CC BY‑SA 3.0/4.0)

#jquery #Browser #iphone #Android #blackberry






相關問題

讓 jQuery 與 Netscape 7 和 8 一起工作 (Getting jQuery to work with Netscape 7 and 8)

使用 Jquery 的 mvc3 搜索結果 (mvc3 search results with Jquery)

從嵌套的 jquery 函數返回一個值 (Return a value from nested jquery function)

Mencocokkan lebar divisi dengan jquery (Matching division widths with jquery)

無法在 jQuery AJAX 中多次生成點擊事件 (unable to generate click event more than once in jQuery AJAX)

使用雙引號格式並用逗號分隔元素數組 (Implode an element array with double quote format and separated by comma)

選擇不更新 (Select doesn't update)

chrome中帶有省略號的多行文本問題 (issue with multiline text with ellipsis in chrome)

AJAX/PHP/JS - 無法將頁面內容加載到容器中 (AJAX/PHP/JS - Cannot load page content into container)

使用 jQuery 將文本插入 textarea (Insert text into textarea with jQuery)

滾動到頁面底部,僅當用戶在 DOM 操作之前已經位於底部時 (Scroll to bottom of page, only if the user already was at the bottom before DOM manipulation)

如何設置單選按鈕的樣式,使其看起來像普通的可點擊按鈕? (How do I style a radio button to look like a normal clickable button?)







留言討論