Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding document.querySelectorAll support to IE 7

Status
Not open for further replies.
Dec 8, 2003
17,047
GB
After battling with an existing JavaScript solutions to add document.querySelectorAll support to IE 7 and finding it failed on several counts, I've come up with a revised script that seemed to be more bullet-proof, at least for the selectors I was throwing it:

Code:
document.querySelectorAll('label[for="postContent"], label[for="threadContent"]');

I've documented the problems I faced with the existing code, as well as a nice IE 7 "gotcha" with the "for" attribute that I hadn't expected.

The final code (still small at 274 bytes) can be found at [URL unfurl="true"]http://www.codecouch.com/2012/05/adding-document-queryselectorall-support-to-ie-7/[/url]

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[blue]@[/blue] Code Couch:
[blue]@[/blue] Twitter:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top