9

I have been using jquery for my web development for a while, and when i use android browser to view my work, i find out that all the jquery function like hide() show() doesn't seems to work.

Can anyone validate this for me, I wonder why jquery is not working for android browser, I am using 2.3.1 right now. Does anyone come across with this problem before?

4

3 回答 3

4

jQuery works just fine in Android browser. The problem isn't that jQuery doesn't work in Android. The problem is something else.

It's hard to say what that problem might be without any code, but you can try to get more hints as to what might be going wrong by looking in the JS error console (or whatever the equivalent is in Android or an Android emulator--basically, where JS errors are logged).

If you want to get super ambitious, you can try debugging it with Weinre or something like that.

于 2012-08-08T02:23:19.733 回答
4

Since you did not post code, we do not know if you were loading your JS assets from the same domain or not. After putting jQuery on the same server instead of using a CDN it resolved my issue. I also had other random JS errors and then I cleared all the data/cache for Chrome and that fully resolved it.

If the issue is something else, you can follow the instructions here to do remote debugging on any of the JavaScript errors:

https://developer.chrome.com/devtools/docs/remote-debugging

于 2016-02-04T12:12:31.783 回答
2

Jquery current browser support on desktop and mobile: https://jquery.com/browser-support/

So seems the problem is not with jquery support for native android emulation, since Stock browser on Android 4.0+ is supported by. Any problem with jQuery in the above browsers should be reported as a bug in jQuery.

于 2017-08-22T12:28:26.977 回答