I am using draggable from jquery UI and I want to be able to reset the info element to 0 and to constrain it so that it cannot be dragged outside of the visible edge piece. Overflow is set to hidden.
What would be the best way to do that?
$.getScript("js/jquery-ui-1.8.23.custom.min.js", function() {
var info = sym.$("info");
info.draggable({ disabled: false });
info.draggable({ snap: true });
info.draggable({ axis: "x" });
});
Nevermind - I had tried "left" and it did not work because of variable scope.
This worked:
sym.$("btnReset").click(function(){
sym.$("info").css("left",0);
});