Skip to content

Tag: css

open/close sidebar changing buttons

it says me -> Uncaught TypeError: document.getElementById(…) is null Answer document.getElementById does not target a node by its class=”” but by its id=”” To target an element by its class you can use document.querySelector

Binding touch and scroll to wheel event

I have this code for vehicle to horizontal and back to vertical scrolling, however it only works on mouse wheel scroll. I also need it to respond accordingly to mobile touch, scrollbars, page up/down, and the keyboard arrow keys. Below is my code: How can I make this work for mobile touch, scroll bar, arrow k…