Home
garafu edited this page Aug 5, 2013
·
9 revisions
"jquery.depend" is a jQuery plugin. This plugin provides following features.
- browser detection.(msie, firefox, chrome, opera, safari...)
- browser version detection.
- platform detection.(pc, mobile, tablet...)
- resolution of client browser dependency.
- support backward contribution.(older version than jQuery 1.9)
This plugin use 'window.navigator.userAgent' string, when detect user's browser and platform.
Example:
var message = $.depend({
on: $.browser.is('msie') && $.browser.version.isOrLess(8),
exe: function () {
return 'Your browser is MSIE, and version is or less 8.0.'
}
}, {
// This code is default action.
exe: function () {
return 'Other browser.'
}
});
// This "alert" show message according to browser and browser version.
window.alert(message);
Demonstration:
- Installation
-
API Documentation
- global
- $.browser
- $.browser.version
- $.platform
- [$.depend(args...)][1]
- Release Note [1]:https://github.com/garafu/jquery.depend/wiki/$.depend(args...)
"jQuery.depend" plugin released under the MIT license.
Please see MIT-LICENSE.txt for details.
This project using following codes.