This site is intended for those who are looking for some common, more sought after and hard to search code snippets which can help you finish your work more efficiently and effectively. I will be posting my experiences and also look forward for enthusiastic developers to share their experiences to help ourselves in a big way.
Tuesday, June 29, 2010
Monday, February 1, 2010
Handling innerText in Firefox
FireFox does not support innerText property. You can use textContent instead. Check for the condition document.all and you can use the method accordingly.
if(document.all){
var productSpecs = items[i].innerText.toString();
}
else{
var productSpecs = items[i].textContent.toString();
}
if(document.all){
var productSpecs = items[i].innerText.toString();
}
else{
var productSpecs = items[i].textContent.toString();
}
Subscribe to:
Posts (Atom)