Renaming the iframe src attribute to facilitate lazy loading
Calling $(this) three times is a bit wasteful.  You can improve that by taking advantage of $.attr(attributeName, function) and by using chaining.



$(function() {   
     $('iframe').attr('data-src', function() { return $(this).attr('src'); })
                .removeAttr('src');
});

// For demonstration...
$(function() {   
     $('#printout').text($('iframe').attr('data-src'));
});
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;body&gt;
  data-src=&lt;span id="printout"&gt;&lt;/span&gt;
  &lt;iframe width="10" height="10" src="http://codereview.stackexchange.com/"&gt;&lt;/iframe&gt;
&lt;/body&gt;