Frage

following is my jquery Code I can access the gallery-folder properties by jquery object but droppable isn't working on it

$(function() {
        jQuery(document).find('#am-container').find('img').draggable({revert: true});
        jQuery(document).find("#gallary-folder").droppable({
            drop: function(event, ui) {
                var draggableSrc = ui.draggable.attr("src");
                var gallery_id = $(this).find('li').attr("id");
            }
        });
    });

Following is my HTML

 <div id="gallery-folder" class="gallery-folder ui-droppable">
    <div class="gallery-folder-inner">
     <a href="gallery_view.php?id=22&gallery_name=Clothes123">
      <img width="68" height="48" src="images/icon-2.png"> </a>
    </div>
</div>

This is the fiddle http://jsfiddle.net/gV7da/4/

War es hilfreich?

Lösung

I saw your fiddle. That's working fine. You are probably unable to really drop your image to the target.

Means you need to drag centre of your draggable object to within the bounds of target obeject. And it must work :)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top