JQuery.event.drop using multiple configurations

I am using jQuery.event.drop from ThreeDubMedia ( here ) to create a drag and drop application. If I read correctly, there is only a way to add global parameters.

I have different settings for these plugins, requiring different configurations.

eg. In one part of the application I use multi option

$.drop({ 
    multi: true
});

On the same page, only in another div, I need to disable multi and set the mode to: true - using this configuration

$.drop(
{ 
    mode:true,
    multi: false
});

When this part of the code is executed, the old configuration is overwritten, and multiple drag and drop will no longer work if I do not overwrite it again.

Any ideas on how to use multiple configurations?

+3
source
1

" ". "start" , , .

- :

$("#myel").drag("start",function( ev, dd ){

    // Replace config

    $.drop({ 
        multi: true,
        mode: "overlap",
    });

    // ... 
})

:

$("#myel2").drag("start",function( ev, dd ){

    // Replace config

    $.drop({ 
        multi: false,
        mode: true,
    });

    // ... 
})

, . , , !

+3

All Articles