Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limited area of draggability #5

Open
taula50 opened this issue Jan 25, 2016 · 0 comments
Open

limited area of draggability #5

taula50 opened this issue Jan 25, 2016 · 0 comments

Comments

@taula50
Copy link

taula50 commented Jan 25, 2016

when i fix contaiment: "#somediv" and it is fixed for every draggable element, only the first one dragged is limited to the area selected:
$(document).ready(function(){
$(".lo_que_sea").multiDraggable({

contaiment: '#wrapping',
scroll: false
}).mousemove(function(event , ui){
           var coord = $(this).position();
           var width = $(this).width();
           var height = $(this).height();
            $("#position").text( "(" + coord.left + "," + coord.top + ")" );

}).mouseup(function(event, ui){
var coord = $(this).position();
var width = $(this).width();
var height = $(this).height();

});

$(".otr_interior").multiDraggable({
containment: '#wrapping',
scroll: false
}).mousemove(function(){
var coord = $(this).position();
var width = $(this).width();
var height = $(this).height();
$("#position1").text( "(" + coord.left + "," + coord.top + ")" );
}).mouseup(function(){
var coord = $(this).position();
var width = $(this).width();
var height = $(this).height();

});

whats wrong???
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant