Reputation: 1
I want to select class="item"
as draggable but this selector is not working:
<body>
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube" >
<ul class="products">
<li>
<a href="#" class="item"> // i want to select this
<img src="images/shirt1.gif"/>
<div>
<p>Balloon</p>
<p>Price:$25</p>
</div>
</a><!-- more products like this --></li></ul></div></div></div>
<script>
$('.item').draggable(....) // not working
</scipt>
</body>
Upvotes: 0
Views: 75
Reputation: 122
The jquery code seems to be correct. maybe it works better if you do it like this:
$(document).ready(function(){
$('.item').draggable(....)
});
this way it wont try to find the tags before the complete DOM is loaded.
Upvotes: 1
Reputation: 3592
1) < script language=...>
2) put all this stuff into document.ready() callback description.
Upvotes: 0