replace the $.browser(.webkit/ ...) deprecied by my idea
hi, i have a idea
- $.browser = {extension : '', mozilla : false, webkit : false, khtml : false, opera : false, microsoft : false};
- if ($(body).css('-moz-user-select') !== undefined) {
- $.browser.mozilla = true;
- $.browser.extension = "-moz-";
- }
- else if ($(body).css('-webkit-user-select') !== undefined) {
- $.browser.webkit = true;
- $.browser.extension = "-webkit-";
- }
- else if ($(body).css('-khtml-user-select') !== undefined) {
- $.browser.khtml = true;
- $.browser.extension = "-khtml-";
- }
- else if ($(body).css('-o-user-select') !== undefined) {
- $.browser.opera = true;
- $.browser.extension = "-o-";
- }
- else if ($(body).css('-ms-user-select') !== undefined) {
- $.browser.microsoft = true;
- $.browser.extension = "-ms-";
- }
my example, it's not perfect, but the idea is here