jQuery draggable - snap to browser? -
i using next code drag div on site:
js13('#wrapper').live('mouseover', function () { js13(this).draggable(); });
but want somehow snap browser, not possible drag outside of browser window bounds.
is possible somehow? ;)
you can utilize containment property (see draggable-api)
in case, might try:
js13('#wrapper').live('mouseover', function () { js13(this).draggable( "option", "containment", $(window)); });
not sure if working solution, not tested.
jquery jquery-ui-draggable
No comments:
Post a Comment