什么是jquery.browser的快速,纯正的javascript替代品(已在jquery 1.9中删除)? [英] What's a quick, pure javascript replacement for jquery.browser (removed in jquery 1.9)?

查看:98
本文介绍了什么是jquery.browser的快速,纯正的javascript替代品(已在jquery 1.9中删除)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我知道最好使用特征检测.

Yeah, I know that feature detection is preferable.

我的代码库中有一个案例,其中我们使用$.browser.msie$.browser.version来决定是否渲染某些CSS.编写代码的开发人员已经不在我们身边,我也不完全了解我应该在此处编写哪种类型的功能检测.

I've got a case in my codebase where we are using $.browser.msie and $.browser.version to decide whether to render some CSS or not. The developer who wrote the code is no longer with us, and I don't fully understand exactly what kind of feature detection I should write here instead.

作为快速解决方案,实现$ .browser.msie和$ .browser.version的最短方法是什么?

As a quick fix, what's the shortest way to implement $.browser.msie and $.browser.version?

推荐答案

我将复制

这篇关于什么是jquery.browser的快速,纯正的javascript替代品(已在jquery 1.9中删除)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆