jquery - Shopping Basket - Drag/Drop not working -
i trying have when drag image specific div (#basketitems
), take attr.('id')
, place div. it's drag , drop shopping cart.
i have following:
jquery(document).ready(function() { $('.draggable').draggable({ containment: 'document', helper: 'clone', opacity: 0.9, revert: true, start: function() { product = $(this).attr('id'); productdetails = product; } }); $('#basketitems').droppable({ drop: function() { alert(productdetails); // not complete } }); });
and html:
<div id="basketitems" class="ui-droppable"> <p>basket items:</p> </div>
using following scripts:
<script type='text/javascript' src='../scripts/jquery-1.7.2.min.js'></script> <script type='text/javascript' src='../scripts/clickykeyboards.js'></script> <script type='text/javascript' src='../scripts/jquery-ui.min.js'></script>
the drag part working nothing happening when drop onto div.
Comments
Post a Comment