{"id":4393,"date":"2026-02-23T17:14:00","date_gmt":"2026-02-23T17:14:00","guid":{"rendered":"https:\/\/ibex.tech\/javascript\/?p=4393"},"modified":"2026-02-23T17:14:28","modified_gmt":"2026-02-23T17:14:28","slug":"manipulating-by-css-class-instead-of-id","status":"publish","type":"post","link":"https:\/\/ibex.tech\/javascript\/manipulating-css\/manipulating-by-css-class-instead-of-id","title":{"rendered":"Manipulating by CSS class instead of ID"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Hide all elements with a specific CSS class<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  document.querySelectorAll('.SomeClassName.SomeOtherClassName').forEach(function(element)\n  {\n    element.style.display = 'none';\n  });<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hide all elements with a specific CSS class<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132],"tags":[],"class_list":["post-4393","post","type-post","status-publish","format-standard","hentry","category-manipulating-css"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/comments?post=4393"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4393\/revisions"}],"predecessor-version":[{"id":4394,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4393\/revisions\/4394"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/media?parent=4393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/categories?post=4393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/tags?post=4393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}