You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
372 B
JavaScript

5 years ago
$(document).ready(function(){
for (var i = 0; i < x.length; i++) {
$("main").append('<pre class="movable">' + x[i] + '</pre>');
}
$( function() {
$( ".draggable" ).draggable();
});
var words = document.querySelectorAll(".movable");
for (var e = 0; e < words.length; e++){
var span = words[e];
span.classList.add("draggable");
}
});