View Single Post
Old 10-14-2008, 05:36 PM   PM User | #1
RadGH
New to the CF scene

 
Join Date: Oct 2008
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
RadGH is an unknown quantity at this point
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',
{
	accept:'tile',
	onDrop:function(){
		Effect.Puff('tile_01');
	}
});
This does work for all the divs with class "tile", however, I need to take the dropped element's ID instead of using the static 'tile_01'. With the code above, dropping any tile will poof tile_01 (first div).

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.
RadGH is offline   Reply With Quote