1

i found the multipe attribute for the select in the internet. Now i get the idea to use this attribute to make a kind of directory navigation. So if i shift cick on multipe files it will select all between them (like in a normal directory browser). So i tried it out with tow different ways, but i saw that no one work, because of the fact that divs aren't valid in a option element.

The code would be this(it got a bit loger so i post you the jsfiddle link):

"http://jsfiddle.net/kg6q9fvm/5/"

Is there any possibility to do this? Hopefully you understand my problem.

Thank you!

sfdasfsd
  • 11
  • 3
  • 1
    Please also post the relevant code in the question. – John Bupit Aug 31 '15 at 12:27
  • 1
    You can't put `div` inside `option`. It's not allowed according to the HTML spec. You can always make your own multi-select widget. – Halcyon Aug 31 '15 at 12:29
  • 2
    possible duplicate of [is it posible to add
    or inside an
    – John Bupit Aug 31 '15 at 12:30

1 Answers1

2

Its not possible to use other elements in select options. you need to use any other plugin which behaves like drop-down like

https://harvesthq.github.io/chosen/

Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106
  • but at the end it shouldn't be a list like in a select element. Instead it should be a row of divs (displayed inline). I just tried to use the select to have the multiselection funktion. – sfdasfsd Aug 31 '15 at 12:32