select multiple items with JS [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI have a bunch of divs (I'll call them items). Most have an image in them but having an image doesn't matter. How can I select these items, have the item show some way of being selected (I was thinking having padding which changes color?) and allow me to add more by hold ctrl and left click or by left clic开发者_如何学Pythonking which creates some kind of mouse box and let me to draw a rect over the items I want to select.
I hope theres a JS container or lib that handles this, what can I use to do the above?
If you're OK using jQuery and its UI library I'd recommend using this: http://jqueryui.com/demos/selectable/#default
精彩评论