Changing the contents of html elements

Element types? Can be anything, so <div id=”, <span id=”, <p id=”, etc N.B. You need to place the <script> after the HTML element, or call it within say window.onload = function() (the div or whatever tag you’ve used must be before the javascript on the page) In your html To manipulate text within a […]

Read More

Hide a section of the page

Use .style.display = just make sure when you show it you are using ‘flex’ and not ‘inline’ if the element is a flex! Hide it: Show it To hide a section with id=pageheader” Display it again

Read More

Targeting specific elements within an ID

Altering the text within a <p> nested below a <div with the assigned ID=”CreateTokenTokenCost”: If you use this on the ID: You will remove the <div> and <p> surrounding the target text, resulting in styling being lost. Instead use querySelector to target the <p> directly:

Read More