Skip to content

Instantly share code, notes, and snippets.

@richerimage
Created July 19, 2014 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richerimage/0e117fbd9136fb94c1f9 to your computer and use it in GitHub Desktop.
Save richerimage/0e117fbd9136fb94c1f9 to your computer and use it in GitHub Desktop.
iFrame <head> inject viewport metatag
$(document).ready(function($) {
var viewTag = '<meta content="initial-scale=1, user-scalable=yes, maximum-scale=1, width=device-width" name="viewport">';
var head = $('#iFrame_ID').contents().find('head');
head.append(viewTag);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment