HTML and CSS Reference
In-Depth Information
Figure 4-2. Modernizr production configuration choices
Sometimes, as well, you may need to go a step further and detect the actual form factor
of the device. FormFactor.js can help you with this. It helps you customize your web app
for different form factors (a mobile version, a TV version, and the like). For example:
if ( formfactor . is ( "tv" )) {
alert ( "Look ma, Im on tv!" );
}
if ( formfactor . isnt ( "tv" )) {
alert ( "The revolution will not be televised" );
}
Because FormFactor.js is a framework to manage conceptually distinct user interfaces,
it doesn't eliminate the need for feature detection. It does, however, help you to use
feature detection in the context of a particular form factor's interface.
Although the community has gone a bit inactive lately, you can find more examples at
https://github.com/PaulKinlan/formfactor .
 
Search WWH ::




Custom Search