Common JavaScript Functions

Element Selectors

document.getElementById( 'idname' );
document.querySelectorAll( '.classname' );

Relationships

element.nextElementSibling;
element.classList.contains( 'classname' ); // bool
element.classList.add( 'classname' );
element.classList.remove( 'classname' );

Leave a Reply