正如许多人在其他问题(以及jQuery文档)中已经发布的那样,旧的jQuery.browser.version
已被弃用,并且仅适用于jquery1.3。
你知道另一种简单的方法来检测它吗?我可以在我的代码中包含它:
function handleInfoDivPopupVisibility(dynamicEleId, staticEleId){
var parentContainer = $('headerSummaryContainer');
var dynamicEle = $(dynamicEleId);
var staticEle = $(staticEleId);
if(isIE() && parentContainer){
if (jQuery.browser.version != 10) { // I need to find a way to detect if it's IE10 here.
parentContainer.style.overflow = 'visible';
}
}
dynamicEle ? dynamicEle.style.display = '' : '';
if(dynamicEle && staticEle)
gui_positionBelow(dynamicEle, staticEle);
}
在你说这是这个或者这个问题的重复之前,我想强调一下我不想使用CSS hack。有没有一种简单的方式来检测它,就像以前那样简单呢?
if (jQuery.browser.version != 10) {...