开发者

how can i extend $.browser

I want to write some jquery that will extend $.browser with开发者_如何学JAVA some of my own properties. So it I can currently access $.browser.msie, how could I extend it to include $.browser.isPngSupported etc?


You can just set $.browser.isPngSupported to true or false.

However, you should be extending $.support, not $.browser.


var newData = {   'isPngSupported': true,
                  'more': 'x',
                  'evenMore':  'y' };

$.browser = $.extend( true, $.browser, newData );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜