What's the replacement for $.browser

前端 未结 6 830
粉色の甜心
粉色の甜心 2020-11-27 18:54

The jQuery document tags $.browser as deprecated. So what\'s the replacement for it?

6条回答
  •  眼角桃花
    2020-11-27 19:10

    There isn't a direct replacement. You should be using feature detection rather than browser detection (do you have a good reason to need to know the browser?), so you can use the $.support property. (It says as much in the API doco for $.browser.)

提交回复
热议问题