Activate sortables only once
This commit is contained in:
parent
0877d7678f
commit
e21caec1e2
|
@ -47,7 +47,7 @@
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
htmx.onLoad(function(content) {
|
function activateSortables(element) {
|
||||||
var sortables = document.querySelectorAll(".sortable");
|
var sortables = document.querySelectorAll(".sortable");
|
||||||
for (const sortable of sortables) {
|
for (const sortable of sortables) {
|
||||||
console.debug("making", sortable, "sortable")
|
console.debug("making", sortable, "sortable")
|
||||||
|
@ -56,7 +56,10 @@
|
||||||
ghostClass: 'blue-background-class'
|
ghostClass: 'blue-background-class'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
activateSortables(document)
|
||||||
|
//htmx.onLoad(function(content) { activateSortables(content) }
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue