Skip to content
Browse files

fixed some syntax errors that resulted in a merge.

  • Loading branch information...
1 parent c839311 commit 5cfe8c7ceeed402b77069e5ba6e2abdfa641c6f7 Scott Jehl committed Jun 20, 2012
Showing with 9 additions and 12 deletions.
  1. +9 −12 picturefill.js
View
21 picturefill.js
@@ -28,22 +28,19 @@
var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
if( matches.length ){
- if( !picImg ){
- picImg = w.document.createElement( "img" );
- picImg.alt = ps[ i ].getAttribute( "data-alt" );
- ps[ i ].appendChild( picImg );
- }
-
- picImg.src = matches.pop().getAttribute( "data-src" );
- }
- else if( picImg ){
- ps[ i ].removeChild( picImg );
+ if( !picImg ){
+ picImg = w.document.createElement( "img" );
+ picImg.alt = ps[ i ].getAttribute( "data-alt" );
+ ps[ i ].appendChild( picImg );
}
+
+ picImg.src = matches.pop().getAttribute( "data-src" );
}
- else if( picImg ) {
+ else if( picImg ){
ps[ i ].removeChild( picImg );
}
}
+ }
};
// Run on resize and domready (w.load as a fallback)
@@ -60,4 +57,4 @@
w.attachEvent( "onload", w.picturefill );
}
-})( this );
+}( this ));

0 comments on commit 5cfe8c7

Please sign in to comment.
Something went wrong with that request. Please try again.