How to convert all() function to work crossbrowser [duplicate]
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])
精彩评论