I have developed drag and drop using jquery ui. So if i drag n drop the element over the boundary of the drop box it still takes in the element so is there any way to restrict the boundary region for the drop ?
Screenshot : http://img10.imageshack.us/img10/5662/borderk.jpg
I have developed drag and drop using jquery ui. So if i drag n
Share
I’m assuming that in your current code you have one element that has a background image.
If you change your html and css to something like this and use the
db-inneras the drop area, then this should work.http://jsfiddle.net/lollero/xTYPP/
HTML:
CSS:
To simplify: Parent element adds padding that restricts the inner element dimensions which are defined to be
100%The idea is that
#db-innerwould be the drop box element and#DropBoxis an extra wrapping element that holds your background image and it just happens to be bigger than the dropbox area.