Skip to content

Instantly share code, notes, and snippets.

@fractile81
fractile81 / toowide.js
Last active August 29, 2015 14:17
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);