1

I would like to implement some "Drag-select" functionality into a project of mine but i'm unsure how to implement it.

The creation of the selection area is not a problem, it's the capturing of elements within the area itself which is confusing me.

2
  • Can you provide some more info on the requirement? Commented Aug 27, 2009 at 10:17
  • Yeah, i should really have stated that i will be using Prototype JS and Scriptaculous to implement this. I was more looking for any general concepts on how to implement the functionality of selecting any DOM node that the selection may cover. Commented Aug 27, 2009 at 11:04

3 Answers 3

1

A jQuery example found here.

Selectable Demo

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, i've not seen this example - will take a look at the source and see how they have implemented it.
0

If you can use jquery there are some plugins that do this operation. Anyway you can check if the position of the element is contained into the selection area coordinates and, if it is, you select it.

Comments

0

Script.aculo.us has a nice implementation of drag-n-drop, but then you have to include this rather large library. Or you could investigate how they done it for that matter, since its open-source.

1 Comment

Thanks, but i'm already aware of the drag-n-drop functionality withing Script.aculo.us. I am already taking advantage of this to great the selection area itself, what i need to know is how i can capture any DOM elements within that capture area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.