Disable a part of JavaScript code [closed]

You would be better off passing a configuration object to the CartesTurn function, which would contain the options passed to droppable:

var options = {
    hoverClass: 'hovered',
    drop: handleCardDrop
}

in this case, you can set the drop to undefined. And the CartesTurn would look like this:

CartesTurn(options);

and the appendTo part like this:

$('<div> </div>').appendTo( '#cardSlotsJoueur' ).droppable(options);

Leave a Comment