FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-DOM-Tutorial/app.js at lesson-8 · rharward/JavaScript-DOM-Tutorial · GitHub
rharward
JavaScript-DOM-Tutorial
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript-DOM-Tutorial
/
app.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
8 lines (6 loc) · 456 Bytes
Breadcrumbs
JavaScript-DOM-Tutorial
/
app.js
Copy path
File metadata and controls
8 lines (6 loc) · 456 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
const
bookList
=
document
.
querySelector
(
'#book-list'
)
;
console
.
log
(
'#book-list next sibling:'
,
bookList
.
nextSibling
)
;
console
.
log
(
'#book-list next element sibling:'
,
bookList
.
nextElementSibling
)
;
console
.
log
(
'#book-list previous sibling:'
,
bookList
.
previousSibling
)
;
console
.
log
(
'#book-list previous element sibling:'
,
bookList
.
previousElementSibling
)
;
bookList
.
previousElementSibling
.
querySelector
(
'p'
)
.
innerHTML
+=
'<br />Too cool for everyone else!'
;
Back
|
FazBrowse Home
|
New Git URL