Implement Alt-Click like in GitHub
piRGoif opened this issue · 5 comments
piRGoif commented
In GitHub, inside a pull request, all changes can be collapsed / open using Alt + Click
See https://help.github.com/articles/using-keyboard-shortcuts/#changes-in-pull-requests
Would be very nice to implement the same 8)
piRGoif commented
The event.altKey attribute is the way to do !
See :
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/altKey
http://api.jquery.com/category/events/event-object/
piRGoif commented
A small demo :
https://codepen.io/pgoiffon/pen/xMYOxW
Molkobain commented
What's the excepted behavior?
- Alt + Click anywhere on the page
- Alt + Click on an entry
piRGoif commented
On an entry :)