Conflicting HTML5 trunk + CSS3 Media Queries + Slider

Hi all,

Has anyone run into any troubles declaring if statements for html5 and css3 media queries for anything <IE9?

I.e.


<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->

All I have in the header is:


<link href="css/master.css" rel="stylesheet" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700|Economica:400,700' rel='stylesheet' type='text/css'/>
<link href="css/media-queries.css" rel="stylesheet" type="text/css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.bxSlider.js" type="text/javascript"></script>
<script type="text/javascript">
  $(function(){
   $('#slider1').bxSlider({
  auto: true,
  autoControls: true
   });
});
</script>

And it’s crashing IE7 and IE8 - like the page won’t load and IE literally crashes.

Let me know if you need some more info about the issue or markup.

Thanks,
Ben

Have you narrowed down the page to just those scripts causing it? Aka, if you take them out, does it not crash?

If it doesn’t crash, see if only one of them is causing the crash. Aka just have one in there at a time. See if it crashes. If it does, try the other one. If you decide both of them are causing crashes, than we need to move this thread to the Javascript forum, as something in those scripts are probably causing the crash.

Need to sort this out first. Actually, I’ll request a move since this is clearly a Javascript issue :).

Could you share the complete HTML so we can play around with it? It’s interesting to hear it’s flat out crashing.

I’m not in the least surprised – scripted shims are fragile enough; trying to run TWO of them at the same time; that’s just begging for it to blow up in your face. Tossing jquery nonsense on top of that and you’ve likely so completely over-thought your page you’ll be lucky if the traffic isn’t 100% bounce and it crashes even modern browsers.

But then, using any of that HTML 5 idiocy is also asking for it to blow up in your face if you actually care about older browsers; especially since you shouldn’t rely on javascript to be present JUST for basic functionality… Just another of the reasons I can’t believe anyone is even TRYING to use HTML 5 in it’s current state… (not that even in it’s completed state it offers any real advantages over 4 Strict / X1.0 Strict so far as actual markup is concerned) as to CSS3, any effects you use are just goofy presentation, so long as the layout doesn’t break, I wouldn’t bother backwards supporting old browsers for it. Oh noes, they don’t get rounded corners and shadows… Big deal.

To me it sounds like you are ice-skating uphill with technologies not ready for use on production websites. Likely not your fault with all the idiotic bad advice out there about HTML 5 that seems to exist for the sole purpose of nube predation; selling new books and seats at lectures, instead of promoting good coding habits, practical and easy to maintain methodologies, and doing what the web is actually for – delivering content to users.

That said, your snippets are gibberish without seeing what it is all that scripting is being applied TO. The shivs could be getting confused by invalid markup – whatever it is you’re loading the jquery for could be latching onto the window events impropery or conflicting – Without actually seeing the page in question, anything we tell you is a wild guess based on no real facts.