Skip to content

Instantly share code, notes, and snippets.

@zivc
Last active August 29, 2015 14:08
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 zivc/da32068d9faf936e568e to your computer and use it in GitHub Desktop.
Save zivc/da32068d9faf936e568e to your computer and use it in GitHub Desktop.
Get every element that has 100% width
[].forEach.call(document.querySelectorAll('*'), function($element) {
var style = window.getComputedStyle($element);
console.log(style.width == "100%" || (style.display == "block" && style.width == "auto"));
});
@zivc
Copy link
Author

zivc commented Oct 29, 2014

Added an $ to be more jQuery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment