Why does this not work at all for me?
<script type="text/javascript" src="Javascript/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="Javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(function() {
$('.selector').draggable({ axis: 'x' }); });
</script>
<body>
<div class="selector">
<p>Drag me around</p>
</div>
I have literally just copied and pasted from the draggable example page on the jQuery site and it just doesn't work :(
Can anyone tell me why?
Why does this not work at all for me?
<script type="text/javascript" src="Javascript/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="Javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(function() {
$('.selector').draggable({ axis: 'x' }); });
</script>
<body>
<div class="selector">
<p>Drag me around</p>
</div>
I have literally just copied and pasted from the draggable example page on the jQuery site and it just doesn't work :(
Can anyone tell me why?
Share Improve this question asked Dec 3, 2009 at 17:46 Sam GregorySam Gregory 1392 silver badges13 bronze badges 02 Answers
Reset to default 15Change the order of the javascript includes, the jQuery core file always comes first.
May sound trivial but you need to load the jQuery library before jQuery UI:
<script type="text/javascript" src="Javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="Javascript/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$('.selector').draggable({ axis: 'x' });
});
</script>
<body>
<div class="selector">
<p>Drag me around</p>
</div>