开发者

jQuery UI drag and drop stop not firing as expected

开发者 https://www.devze.com 2023-02-08 08:10 出处:网络
$(\'#img\' + imgID).draggable({ helper: \'clone\', opacity: 0.35, stop: dragImageEnd() }); // Called when a drag image has been dropped
$('#img' + imgID).draggable({ helper: 'clone', opacity: 0.35, stop: dragImageEnd() });

        // Called when a drag image has been dropped
        function dragImageEnd(){
            alert(currentlyOverFolderID);
        }

The drag event is working perfectly as expected, except when the draggable property is being added initially to each element it fires the dragImageEnd() event, and when I start dragging and dropping after that the event never fires.

I'm probably using it incorre开发者_如何学Cctly, any tips?


From

{ stop: dragImageEnd() }

to

{ stop: dragImageEnd }
0

精彩评论

暂无评论...
验证码 换一张
取 消