{"id":4264,"date":"2023-01-13T19:22:39","date_gmt":"2023-01-13T19:22:39","guid":{"rendered":"https:\/\/ibex.tech\/javascript\/?p=4264"},"modified":"2026-02-16T14:46:03","modified_gmt":"2026-02-16T14:46:03","slug":"page-load","status":"publish","type":"post","link":"https:\/\/ibex.tech\/javascript\/page_control\/page-load","title":{"rendered":"Page Load"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Hiding sections before we choose to show them<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;style>\n    #SectionA,\n    #SectionB {\n      display: none;\n    }\n  &lt;\/style><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Running code once page has loaded<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;script&gt;\n    document.addEventListener(\"DOMContentLoaded\", function(event) {\n\n\n    });\n  &lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Running code on page load<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;script&gt;\n    window.onload = function()\n    {\n\n    };\n  &lt;\/script&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hiding sections before we choose to show them Running code once page has loaded Running code on page load<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"class_list":["post-4264","post","type-post","status-publish","format-standard","hentry","category-page_control"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4264","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/comments?post=4264"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4264\/revisions"}],"predecessor-version":[{"id":4385,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4264\/revisions\/4385"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/media?parent=4264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/categories?post=4264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/tags?post=4264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}