AlexMorley-Finch AlexMorley-Finch - 1 year ago 128
jQuery Question

jQuery UI Draggable Not Working

Ive included the jquery library, afterwards the jquery UI library, and it stillDoesnt work. Using Chrome

code Follows:

<script src="js/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.16.custom.min.js" type="type/javascript"></script>
<script type="text/javascript">
$(function() {
$( ".drag" ).draggable();

<div id="aboutBox" class="boxLook boxBg drag"></div>

??? Cant find any solutions anywhere. The debugger says that the method draggable doesnt exist. But ive added jquery AND jquery ui, and the paths are correct! it just doesnt work

Answer Source

You have one of these problems:

  1. Your jQuery or jQuery UI Javascript path files are wrong
  2. Your jQuery UI does not include draggable
  3. Your jQuery or jQuery UI Javascript files are corrupted
  4. Your div is unstyled and empty, therefore there is nothing to drag
  5. Something is colliding with your jQuery or jQuery UI so it doesn't work

Your code is correct, and it should work:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download