I’m using jQuery.event.drop by ThreeDubMedia (here) to build a drag and drop application. If i read right, there is only the way to add global options.
I have different usecases for this plugins, requiring different configs.
e.g. In one part of the application, i am using the multi option
$.drop({
multi: true
});
On the same page, just in another div, i need to disable multi and set mode: true – using a config like that
$.drop(
{
mode:true,
multi: false
});
When executing this piece of code, the old config is rewritten and the multi drag and drop won’t work anymore – unless i overwrite it again.
Any ideas on how to use multiple configs?
Came up with a little “hacky solution”.
I’m now using the drag “start” event to replace the config to the currently needed for the drag & drop action.
Something like this:
And on the other drag binding:
Not very beautiful but at least it works.
If you have other solutions for this, please share!