Skip to content

Instantly share code, notes, and snippets.

@fractile81
Last active August 29, 2015 14:17
Show Gist options
  • Save fractile81/a6760e32bde0f27a9962 to your computer and use it in GitHub Desktop.
Save fractile81/a6760e32bde0f27a9962 to your computer and use it in GitHub Desktop.
Select any visible elements wider than the body, or those that lie outside the right-side of the viewport. Requires jQuery, and meant for use in a browser console.
(function($){var w=$(window).width();$('body').find('*:visible').each(function(){var x=$(this).width();if(x>w||$(this).offset().left+x>w){console.log(this);}});})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment