开发者

Targeting a sortable thats being dragged

So I'm convinced this is a simple thing to work out if you know your way around jQuery/Javascript, obviously I don't as I can't figure out how to do it!

I have some code that used the 'this' selector to get the current thing being dragged 'div.block' which can be found here: http://jsfiddle.net/tktGA/4/

However I now need to change the implementation over to a jQuery UI sortable, instead of dra开发者_Python百科ggable, and now 'this' targets the wrong thing, anyone any ideas on how I can target the item being dragged again ?

The new sortables converted code (so far) is here > http://jsfiddle.net/WqZ9m/11/

NOTE: It targets something else because with sortables I have to target the container's (#areaOne, #areaTwo) instead of what it used to target (.block), the block's themselves.

What should happen in the new sortables version is that when you drag a block over to the edge (the right), it scroll's to the next area, like it currently does on the draggable code, but because it's not targeting the .block, it does not scroll over :/

Anyone got any ideas as to how I can target the correct block being dragged?

Any help is very much appreciated!


Just for any future reference I used ui.helper to target the element being dragged.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜