+ 1
Hey guys, how do you make a drop down menu with javascript and css
javascript drop down menu
1 Resposta
+ 3
first create the list you want drag and drop
1
<div class="column"><header>A</header></div>
2
<div class="column"><header>B</header></div>
3
<div class="column"><header>C</header></div>
4
<div class="column"><header>D</header></div>
5
<div class="column"><header>E</header></div>
The required CSS to prevent the text contents of draggable elements from being selectable.
1
[draggable] {
2
-moz-user-select: none;
3
-khtml-user-select: none;
4
-webkit-user-select: none;
5
user-select: none;
6
-khtml-user-drag: element;
7
-webkit-user-drag: element;
8
}
Load the sortable.js at the end of the document.
1
<script src="sortable.js"></script>
Enable the Html5 drag and drop on the target items.
1
Sortable({
2
els: '.column'
3
});
Destroy method.
1
s.destroy();