You can't manipulate the HTML of an iframe if the content is not from the same domain, this is prevented by the browser in order to counter cross site scripting. That would be the first place I'd look. The second is changing up your jQuery selection slightly:
var $html = jQuery('iframe').contents().find('html');
I can't recall why this works off the top of my head, just that it does.