javascript - Filtering mobile browsers by failure to execute using jQuery -
Just getting a few CSS for a mobile web app (using xhtml-basic / xhtml-basic11 dtd) and A reliable way of filtering for mobile browsers is that I have taken a look but it appears to filter based on the list of string matches.
This is what I would like to do:
1 - In CSS, set some parts of the page to hide from mobile browsers
#hideMeFromMobiles {display: none;}
2 - Call a script using a trusted library which is failing in the mobile browser. The script does something like this (pseudocode)
browser = .window.width> = 480px then {$ (Hide #FramMobiles) .addStyle (Display: Block;)}
It is the idea that the script to fail in a non-destructive manner on a mobile browser and in the desktop web browser To successfully run
My question is this:
Work first? Is there any reason that this is a dead end and I should go to another solution?
And secondly, can anyone confirm the correct jQuery syntax?
Thanks for your help, first of all, you can lie about mobile browser width and scale or scroll.
Thirdly, you will need some quotes around that "#Haidayamamomics" specifier.
Fourth, some mobile browsers are javascript turned off by default (I'm looking at you blackberry browser). Do you have any & lt; Noscript & gt; Markup will be required.
Testing the loss of Mobile Bowers You should start it.
Finally, some mobile browsers are great, especially on new smart phones that use webkit.
Comments
Post a Comment