Granted, Ajax is right now the shooting star amongst JavaScript technologies. And it is cool, think about the improved user experience through better responsiveness. But there are other interesting JavaScipt projects too, maybe a bit hidden behind all that glamour that is Ajax.
A very cool library I discovered recently is Walter Zorn's DHTML Library, enabling programmers to support Drag N Drop amongst other things. Crossbrowser compatible.
What I did | |
---|---|
|
The my_DropFunc() function | |
---|---|
function my_DropFunc() { var nx=Math.round(dd.obj.x/53)*53; var ny=Math.round(dd.obj.y/52)*52; dd.obj.moveTo(nx, ny); } ... dd.obj contains the currently dropped object. I just had to take that object's x- and y coordinates, snap it to multiples of 53 and 52 and call dd.obj.moveTo to move the objects there. That's about as elegant as it gets. |
Comments - Make a comment |
The comments are owned by the poster. We are not responsible for its content. |
AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki
Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread
Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread
Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread