97 7

Hide element(s) by class

Some examples for hiding the class.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
//Ex //<div class="appBanner">appbanner</div> document.getElementsByClassName('appBanner')[0].style.visibility = 'hidden'; //change the style rules of all elements matching the class []'.appBanner'), function (el) { = 'hidden'; }); //If for...of is available then use for (let el of document.querySelectorAll('.appBanner')) = 'hidden'; //And the other one Array.filter( document.getElementsByClassName('appBanner'), function(elem){ = 'hidden'; }); //and the last one var appBanners = document.getElementsByClassName('appBanner'), i; for (i = 0; i < appBanners.length; i += 1) { appBanners[i].style.display = 'none'; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus