In many tech conferences, attendees are invited to rate the talk and/or the speaker from 1 to 5 stars. This type of ratings is interesting but has a few drawbacks.
The discussion started as a twitter thread with this french proposition.
In many tech conferences, attendees are invited to rate the talk and/or the speaker from 1 to 5 stars. This type of ratings is interesting but has a few drawbacks.
The discussion started as a twitter thread with this french proposition.
This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.
Just use the code in index.js in your app or website. You can see usage in the test page test.html.
The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |