javascript - Can't select HTML5 element's children in IE8 with jQuery selector -
I got some posts with similar issues, but this is something different I read another post after reading jQuery 1.4 I have upgraded to 1.4.2, but the problem still presents itself. I tried to run IE 8 in compatibility mode and nothing seemed to work. Of course, it works perfectly in Chrome.
Here's the markup:
& lt; Section square = "please wait button" & gt; & Lt; P & gt; & Lt; Img src = "picture / please_white" alt = "please wait" /> & Lt; / P & gt; & Lt; P & gt; & Lt; Input type = "image" src = "image / add_to_cart.png" alt = "add to cart" / & gt; & Lt; / P & gt; & Lt; / Section & gt;
Here's just a jQuery selector that does work in this scenario ...
$ ('. Please 'Watubutan') Length // 1
And here are the jQuery selectors that will not work!
$ ('. PleaseWaitButton'). (Find 'Input') Length // 0 $ ('Please Wait Beton Input'). Length // 0 $ ('Please wait panel' gt; p & gt; input '). Length // 0
Any ideas? to anyone ...?
Internet Explorer 8 has odd support for HTML 5, IE6 and IE7 side, it is not supported .
You need HTML 5 elements in style and in the right way methods / properties like internal HTML, use them on getElementsByTagName.
It will work in IE6-IE8:
& lt ;; Doctype html & gt; & Lt; Html & gt; & Lt ;! - [If LT IE 9] & gt; & Lt; Script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js" & gt; & Lt; / Script & gt; & Lt; [Endif] - & gt; & Lt; Section class = "please vote" & gt; & Lt; P & gt; & Lt; Img src = "picture / please_white" alt = "please wait" /> & Lt; / P & gt; & Lt; P & gt; & Lt; Input type = "image" src = "image / add_to_cart.png" alt = "add to cart" / & gt; & Lt; / P & gt; & Lt; / Section & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Warning ($ 'please.' Button '). (' Input ') search length. ($ (' Please wait input input ') length) alert ($ (' please. & Lt; / script & Gt; & lt; / html & gt;
Live demo:
Comments
Post a Comment