Permalink
Browse files

multiple images fix

  • Loading branch information...
1 parent 5cfe8c7 commit 0db1c7d9876868567ded46564326fc4c6ea1b3cc atlatl committed Jun 20, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 picturefill.js
View
3 picturefill.js
@@ -10,6 +10,7 @@
// Loop the pictures
for( var i = 0, il = ps.length; i < il; i++ ){
+ var picImg = null;
if( ps[ i ].getAttribute( "data-picture" ) !== null ){
var sources = ps[ i ].getElementsByTagName( "div" ),
@@ -25,7 +26,7 @@
}
// Find any existing img element in the picture element
- var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
+ picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
if( matches.length ){
if( !picImg ){

0 comments on commit 0db1c7d

Please sign in to comment.