What error could there be in the line with li draggable? (As the console says in the browser).

<script> $("li").draggable({ revert: true, scroll: false, helper: 'clone' }); $("#city-second").droppable({ drop: function (event, ui) { this.value = $(ui.draggable).attr('id'); } }); </script> 

From the above list of cities, each of which is enclosed in a li tag, it is necessary to make their names drag and drop into a line and a line, respectively, filled with the names of these cities.

  • Does the console in the browser say "There is some kind of error here"? Or something more specific? - vp_arth
  • jquery-ui.min.js: 6 Uncaught ReferenceError: jQuery is not defined at jquery-ui.min.js: 6 at jquery-ui.min.js: 6 (anonymous) @ jquery-ui.min.js: 6 ( anonymous) @ jquery-ui.min.js: 6 second-form.html? country = & city = & name = & login = & pass_confirmation =: 51 Uncaught ReferenceError: $ is not defined at second-form.html? country = & city = & name = & login = & pass_confirmation =: 51 Underline the line with li: $ ("li"). draggable ({ RubyRose111
  • jQuery is not defined , $ is not defined you did not connect jQuery - vp_arth
  • <script type = "text / javascript" src = "js / jquery-ui.min.js"> </ script> <script type = "text / javascript" src = "js / jquery.drag-drop.plugin.js "> </ script> Everything is connected. - RubyRose111
  • This is not jquery, but jquery-ui, plugs without a kernel) - vp_arth

0