Abban / jQuery-Picture

jQuery plugin to handle responsive images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no support for "picture" in IE9

vlrprbttst opened this issue · comments

just noticed that the picture option simply doesnt work in ie9

I do experience the same problem. Swapping picture for figure isn't doing the trick in my case...

I ended up manually changing 'source' to 'pic-source' in query.pucture. Off course you've to do so in the html as wel.
I think it would be a good idea to change the master according to this issue.

Since the picture element doesn't actually exist, IE is probably ignoring it so it would need to be "created" in the same way that all the HTML5 elements are in the popular html5shiv script so that IE knows about it and can then deal with it.

Hi Ian, strange thing is I had html5shiv included (latest release), but IE is still ignoring the picture tag.

I think IE will always ignore the picture tag. Now that srcset has been implemented in Webkit I'd say that the rest of the browsers will follow suit. Ugly markup, but at least some progress is finally being made.

The picture element isn't in the html5shiv, I was just pointing out that it needs something similar in order to understand it, e.g. document.createElement("picture");

I don't think the createElement trick will fix the issue. IE9 is removing source tags that aren't nested inside an audio or video tag before js runs.

I had the same Problem, but now it works. I looked how picturefill fixed this problem and they use the following syntax:

 <picture>
      <!--[if IE 9]><video style="display: none;"><![endif]--> 
      <source src="foo.png">
      <source src="@teaser.ImageSource" media="(min-width: 768px)">
      <source src="@teaser.ImageSource" media="(min-width: 996px)">
      <!--[if IE 9]></video><![endif]-->
      <noscript>
          <img src="@teaser.ImageSource" alt=""/>
      </noscript>
</picture>