![]() |
script.aculo.us Draggables question
Scriptaculous Draggables website
I'm trying to create my own object class "tile", which essentially is like an icon on your desktop with functions like... tile.recycle (delete via effect.poof), tile.icon (icon element id) and more. However, I don't fully understand the object scope of their classes. For example, this small bit of code allows me to drop my div on a 'recycler div' and it "poofs" (well, puffs) away with an animation. Code:
Droppables.add('recycler',I tried using this, but I need more of a that. The "triggering div" you might call it. I've looked through the documentation, but it wasn't very helpful. |
so you're trying to figure out which draggable hit your droppable, right?
onDrop will automatically get the element that was dropped on it... then it's just a matter of getting the id. see below. identify() is part of prototype. Code:
onDrop:function(element){ |
| All times are GMT +1. The time now is 06:33 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.