开发者

select multiple items with JS [closed]

开发者 https://www.devze.com 2022-12-15 13:32 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

I 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号