Not so long ago I saw one of the developers I work with writing a very complex function to allow a smooth scrolling to a lower element on the page. I was quite surprised that he doesn’t use scrollIntoView()
and his behavior
parameter and its smooth
value. Did you heard of it?
Posts for ‘did you know’ keywords
Did You Know – defaultValue for input in JavaScript
I keep writing this little series of Did You Know articles about specific little parts of the CSS, HTML or JavaScript. One little thing to learn, easy to digest and use in your dailywork. Last time it was about Lists and specific attributes like start
, reversed
and type
for ul
and ol
elements. This time, let’s dive into defaultValue
in JS.