jquery draggable get its content JS fired twice
问题 I noticed the first time you drag it around and then cancel the dragging, the js in the dragged item will fire another time, after that, everything seems normal, any idea? 回答1: I found the answer on the jquery ui forum! update is firing twice because 2 lists are being update (the original, and the list it moves to). so, you can either you the receive: option or in your update you can add: this check: if (this === ui.item.parent()[0]) { //do your stuff here } here's the thread on the jquery