mousedown drag to select
- Started
- Last post
- 8 Responses
- seed
Is it possible to left click and hold down the mouse button and drag across divs, or similar elements, to select them?
I am thinking of a horizontal grid of the hours in a day. I'd like to drag across to select the needed time slots.
Similar to how you may drag to select text on a page. This will use AJAX to set what was selected though.
I'm just wondering if the drag/mouse event is possible.
- seed0
I just found this jquery plug-in. This could work if you can hold shift to select from multiple areas. Kind of like dragging to select files in windows.
- FredMcWoozy0
If you have a pen tablet you can do it.
- version30
like so?
http://arshaw.com/fullcalendar/
- seed0
v3, that is cool. That could sort of do it if it is easy to add a new item.
I am more referring to clicking down on the 12th dragging over to the 16th and letting go. This would highlight those dates and set them as selected.
- seed0
This is a good example.
http://stephencelis.com/projects…
I'm sure it could be converted to hours in a day. I want this in an app I'm doing UI for and there's no way they'll develop it unless I hand it to them ready to go.
If anyone knows any other scripts let me know.
- acescence0
not sure of a script, but it seems pretty simple to code up with a series of mousedowns on the divs to start your selection process and some code to check if the mouse is already down while mousing over other divs, then "selecting" all the divs in between that range. i'd probably just add a class to the selected divs, then on mouseup, get all of the divs that have the class.
- ESKEMA0
something like this? but draggable also?
http://jqueryui.com/demos/select…
- ESKEMA0
^^mix it up with this:
http://jqueryui.com/demos/sortab…know shit about jquery. don't know if it can be done...
- i think he just wanted drag to select, not re-order, the above looks like it would doacescence