David Storey wrote:
For styling the page handheld stylesheets should be used. For
JavaScript issues I don't know of a way to specifically detect if it is
a handheld, and browser sniffing is far from ideal on mobile due to many
reasons.
Could you give an element a specific style in the handheld stylesheet
and then test for that style being applied in the javascript? I'm
thinking along the lines of:
in screen.css:
#checker {width:1px;}
in handheld.css:
#checker {width:2px;}
in script.js:
var el = document.getElementById(“checker”);
if (window.getComputedStyle(el,"").getPropertyValue("width") == '2px' )
{
/* handheld script goes here
No idea if it would execute in whatever handheld browser is needed, and
my brief research indicates this style grabbing in javascript is a bit
flaky cross browser even on the desktop, but you might be able to hack
something together that works a lot of the time.
Rob
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************