r/programming • • Apr 18 '13

jQuery 2.0 Released

http://blog.jquery.com/2013/04/18/jquery-2-0-released/
838 Upvotes

214 comments sorted by

View all comments

Show parent comments

-1

u/Thimble Apr 19 '13

Which one will IE10 (doesn't support conditional comments) load? I can't test because I'm on IE9...

3

u/Klathmon Apr 19 '13

it will load the second (2.0) just like firefox and chrome...

3

u/sharth Apr 19 '13 edited Apr 19 '13

If your browser does not support conditional comments, like firefox and webkit, then lines 1,2,3,4 and 6 are all traditional comments. So line 5 will be executed, which loads 2.0.0.

If you are using a browser that does not understand conditional comments, these are the comments you would see. I've marked with ☞ and ☜ what would be parsed as a comment. Note that the entire include for 1.9.1 is within a comment.

☞<!--[if lt IE 9]>
    <script src="jquery-1.9.1.js"></script>
<![endif]-->☜
☞<!--[if gte IE 9]><!-->☜
    <script src="jquery-2.0.0.js"></script>
☞<!--**<![endif]**-->☜

-3

u/StrmSrfr Apr 19 '13

Speculation: both.

2

u/matthiasB Apr 20 '13

Look closer to where the comments are placed.

1

u/StrmSrfr Apr 20 '13

Oh, I'm dumb. Thanks.