user3032973
user3032973

Reputation: 415

jquery "unrecognized column IE8 not selecting

Building an extension ontop of a Business Intelligence software platform. Am building the following HTML

<ul class="project">
    <col1 id="col1">
        <li class="proj vis"></li>
        <li class="proj vis"></li>
        <li class="proj vis"></li>
    </col1>
    <col2 id="col2">
        <li class="proj vis"></li>
        <li class="proj vis"></li>
        <li class="proj vis"></li>
    </col2>
</ul>

Attempting to execute the following query.

 $('#col1 .proj.vis');

However it returns an empty set. On Chrome and other browsers it works perfectly.

Also tried the following

$('.project col').size()

The following will return elements, however it is not separated by col

$('.proj.vis');

Upvotes: 0

Views: 33

Answers (1)

Jeremy J Starcher
Jeremy J Starcher

Reputation: 23863

Whatever you are trying to do can't possibly work.

  1. IE has known issues when using non-standard HTML elements. I'm not sure if IE8, in standards mode, is affected or not. IE8 is quirks mode certainly is. More info available here: http://blog.whatwg.org/supporting-new-elements-in-ie

  2. The call $('#col1 .proj.vis'); returns the empty set in all browsers. There is no element with the ID of col1. $('col1 .proj.vis');, on the other hand, returns 3 under Chrome.

If you must use the element of col1, then in your document HEAD, before anything else happens, add the line:

// Make IE recognize this element.
document.createElement("col1");

(I tried creating a fiddle, but JS fiddle broke down when I switched to IE8 mode in the browser.)

Upvotes: 1

Related Questions