-
Notifications
You must be signed in to change notification settings - Fork 77
Usage
barisaydinoglu edited this page May 31, 2012
·
6 revisions
Wiki Pages: Home | Setup | Usage | Changelog
This is a library that uses your trusty little Modernizr to give you the possibility of specifying required features for a certain stylesheet. Using it is a simple matter, illustrated in the following excerpt:
Modernizr.Detectizr.detect({detectScreen:false});
Sample usage as all options set to defaults:
Modernizr.Detectizr.detect({
// option for enabling HTML classes of all features (not only the true features) to be added
addAllFeaturesAsClass: false,
// option for enabling detection of device
detectDevice: true,
// option for enabling detection of device model
detectDeviceModel: true,
// option for enabling detection of screen size
detectScreen: true,
// option for enabling detection of operating system type and version
detectOS: true,
// option for enabling detection of browser type and version
detectBrowser: true,
// option for enabling detection of common browser plugins
detectPlugins: true
});
Just remember to include Modernizr before Detectizr, and you're good to go!