开发者

How to convert all() function to work crossbrowser [duplicate]

This question already has answers here: Replacement of .all() function for Browsers other than IE (2 answers) Closed 8 years ago.

I have below code. I want to convert this as cross browser compatible. As all() is IE only function i need to convert this. Please help me.

 for(j=1,oTblRo开发者_JAVA百科ws=tblSource.rows,tLen=oTblRows.length;j<tLen;j++){
    o=oTblRows[j].all("center");        
    if(o && (o.innerText === selCenter.value)){
                  $(oTblRows[j]).show();
    }
    else{
        $(oTblRows[j]).hide();
    }

}


I believe this is what you want. We want to match all elements with the id of "center" within the current row.

o=jQuery("#center", oTblRows[j])
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜