Skip to content

Instantly share code, notes, and snippets.

Created November 21, 2014 07:25
What would you like to do?
HTML Select multiple without ctrl key
* DWTFYW License
* Author: Tony Brix,
* Set all multiple select elements to allow selecting multiple without using the ctrl key
$.fn.selectMultiple = function(){
return this.mousedown(function(e){
//save scrollTop to prevent scrolling on selection change.
var scroll = this.scrollTop; = !;
this.scrollTop = scroll;
Copy link

Tried it and didn't work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment