Skip to content
Advertisement

can select multiple be draggable?

JavaScript
JavaScript
JavaScript

is it possible with javascript to stop the hold-select effect and make it a drag to change elements order in the list?

i tried to e.preventDefault() and to bind a draggable script in options but did not work

Advertisement

Answer

I don’t think you can do that with select element :

Trying to change the code you provide making a simple one

index.html

JavaScript

script.js :

JavaScript

However you can use multiselect plugin ,a demo here

EDITED :

If you still want the select tag look you can use dragOptions

JavaScript
JavaScript

As you see when you drag an option an error occurs (maybe an issue))

If someone can tell me what’s going wrong here i will appreciate that !

Hope that helps someone .

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement