1
I’m using this code to move Ivs simultaneously: https://github.com/someshwara/MultiDraggable
The logic: If checkbox is checked, use drag in group, otherwise use drag per unit'.
But once unchecked the checkbox (to use drag per unit) the same is not working as it should in the following example: https://jsfiddle.net/L56yvyms/1/
$('document').ready(function() {
$("#checkboxDragAll").click(function() {
if ($(this).is(':checked'))
{
//Se 'checkbox marcado' drag funciona em "grupo"
$(".d").multiDraggable({
group: $(".d")
});
//Setando o drag em .d2 em "unidade"
// $(".d").multiDraggable({
// group: ""
//});
} else {
//Se 'checkbox desmarcado' drag deveria funcionar em "unidade"!!!
// Mas se anteriormente setado em "grupo",
// o drag em "unidade" não está funcionando.
$(".d").draggable( "destroy" );
$(".d").draggable();
};
});
});
Somebody save me? : B
E.. I understand you :) But I took a look, there are problems even in draggable "Destroy". From what I saw when unchecking, he does one at a time, that is, when scoring and unchecking 3 times it works :P...
– Samir Braga
Um, let me take a look at that, if that’s how it is, just do one each on the Divs I think =)
– user31050
That’s what I thought. But it didn’t work, I ran some tests with
each
– Samir Braga
It is I tested and it did not work tmb Samir
– user31050