/    Sign up×
Community /Pin to ProfileBookmark

Help Hide Element Using JavaScript

[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-09-19/1568919459-406503-hmtltest.png]
[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-09-19/1568919459-486009-javascripttest.png]
[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-09-19/1568919459-549182-terminaltest.png]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@JavaLeattaLynnauthorSep 19.2019 — ["Hide Element Using JavaScript","Help Hide Element Using JavaScript"]
Copy linkTweet thisAlerts:
@SempervivumSep 19.2019 — You better post code in as text in code tags: `your code here`, not as screenshots.

And I recommend using meaningful names instead of x, y, z, a, b.

I cannot spot any error in the last line of code. Did you place the javascript [b]below[/b] the HTML? If not, the DOM elements do not yet exist and getElementById will return null.
×

Success!

Help @JavaLeattaLynn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...