Created
May 8, 2016 18:51
-
-
Save drakvuf/5e3527cc35e99710c55cf432d6e07998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var el = document.querySelector('.element'); | |
//előző elem -> textnode-al térhet vissza! | |
var prevEl = el.previousSibling; | |
//előző elem meglepetések nélkül | |
var prevEl = el.previousElementSibling; | |
//előző elem -> textnode-al térhet vissza! | |
var nextEl = el.nextSibling; | |
//következő elem meglepetések nélkül | |
var nextEl = el.nextElementSibling; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment