IE9 does not accept jQuery standard syntax

It is really very simple. I have the following code .. and it works in any other html5 compatible browser (Safari 5, Chrome 9, FireFox), but in IE9 (RC) I get the following errors.

jquery.min.js

Line: 16 Error: the object does not support the property or method 'getElementsByTagName'

Jquery-ui.min.js

Line: 40 Error: Object does not support property or method tabs

<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=9" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script> <script type="text/javascript"> $(function () { $("#ribbon").tabs(); }); </script> </head> <body> <header> <span id="branding"></span> <div id="ribbon-navigation"> <div id="ribbon"> <ul> <li><a href="#ribbon-1">1</a></li> <li><a href="#ribbon-2">2</a></li> <li><a href="#ribbon-3">3</a></li> <li><a href="#ribbon-4">4</a></li> </ul> <div id="ribbon-1" class="ribbon-strip"> @Html.Partial("Menus/Ribbons/__H1") </div> <div id="ribbon-2" class="ribbon-strip"> @Html.Partial("Menus/Ribbons/__2") </div> <div id="ribbon-3" class="ribbon-strip"> @Html.Partial("Menus/Ribbons/__3") </div> <div id="ribbon-4" class="ribbon-strip"> @Html.Partial("Menus/Ribbons/__4") </div> </div> </div> </header> </body> </html> 

I could understand that my CSS just didn't create the right styles, but it looks like it completely ignores $("#ribbon").tabs(); together. Any ideas?

+8
jquery html5 jquery-ui internet-explorer-9
source share
2 answers

Further digging yielded more fruitful results ... bugs.jquery.com/ticket/8052 - This seems to be a bug in IE, and was fixed in a jQuery update that came out yesterday of all time! I had to reference jQuery 1.5.1 and it all worked fine.

Thanks to everyone who jumped in with helpful suggestions. They were very good ideas, but this time it turned out to be just a mistake with IE9 and nothing more.

+12
source share

Try:

 $(document).ready(function () { $("#ribbon").tabs(); }); 
+2
source share

All Articles