AshesOfOwls / jquery.shapeshift

A dynamic grid system with drag and drop functionality.
http://ashesofowls.github.com/jquery.shapeshift/
MIT License
1.67k stars 311 forks source link

Remove and trash event woun't fire #65

Open arpo opened 11 years ago

arpo commented 11 years ago

I can't get the trash and remove event so fire. I'm using the code in the trash example but can't get it to work.

Code used: var $containers = $(".container"); $containers.on("ss-removed", function(e, selected) { console.log("This item:", $(selected)); return console.log("Has been removed from this container:", $(this)); });

$containers.on("ss-trashed", function(e, selected) { console.log("This item:", $(selected)); return console.log("Has been removed from the DOM"); });

Am I missing something?

AshesOfOwls commented 11 years ago

I'll see if I can get to answering this and some of the other questions tonight.

jackmarketon commented 11 years ago

You are assigning both all containers a trash. Try setting a specific container as the trash instead of all containers. Use an ID to get the specific container.

Also, a jsfiddle would be helpful.