This project is archived and is in readonly mode.

#1055 ✓resolved
elado

IE8, HTML5 Elements and getElement problem

Reported by elado | October 23rd, 2010 @ 12:13 PM | in 1.3.1 (closed)

With this HTML:

<div id="page">
    <header>
        <h1><a href="#x">Hi</a></h1>
        <nav>
            <a href="#x">1</a>
            <a href="#x">2</a>
        </nav>
    </header>
</div>

This piece of code returns the element on all browsers except IE8:

$("page").getElement("header nav")

However, this works even on IE8:

$("page").getElement("header").getElement("nav")

And also these:

$("page").getElement("h1 a")

$("page").getElementsByTagName("header")[0].getElementsByTagName("nav")[0]

The only difference is the use of HTML5 elements.

Fiddle: http://www.jsfiddle.net/elado/q72Lb/

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages