Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Remove old commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
jansepar committed Jan 13, 2014
1 parent 5ea243a commit 4fd4287
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions picturefill.js
Expand Up @@ -206,52 +206,6 @@
}
};


// w.picturefill = function() {
// var ps = w.document.getElementsByTagName( "span" );

// // Loop the pictures
// for( var i = 0, il = ps.length; i < il; i++ ){
// if( ps[ i ].getAttribute( "data-picture" ) !== null ){

// var sources = ps[ i ].getElementsByTagName( "span" ),
// matches = [];

// // See if which sources match
// for( var j = 0, jl = sources.length; j < jl; j++ ){
// var media = sources[ j ].getAttribute( "data-media" );
// // if there's no media specified, OR w.matchMedia is supported
// if( !media || ( w.matchMedia && w.matchMedia( media ).matches ) ){
// matches.push( sources[ j ] );
// }
// }

// // Find any existing img element in the picture element
// var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];

// if( matches.length ){
// var matchedEl = matches.pop();
// if( !picImg || picImg.parentNode.nodeName === "NOSCRIPT" ){
// picImg = w.document.createElement( "img" );
// picImg.alt = ps[ i ].getAttribute( "data-alt" );
// }
// else if( matchedEl === picImg.parentNode ){
// // Skip further actions if the correct image is already in place
// continue;
// }

// picImg.src = matchedEl.getAttribute( "data-src" );
// matchedEl.appendChild( picImg );
// picImg.removeAttribute("width");
// picImg.removeAttribute("height");
// }
// else if( picImg ){
// picImg.parentNode.removeChild( picImg );
// }
// }
// }
// };

// Run on resize and domready (w.load as a fallback)
if( w.addEventListener ){
w.addEventListener( "resize", w.picturefill, false );
Expand Down

0 comments on commit 4fd4287

Please sign in to comment.