calculate div position
are closed

After trying out loads of ways to find out the position of div in web page I found this be the best code function getPosition(obj){ var topValue= 0,leftValue= 0; while(obj){ leftValue+= obj.offsetLeft; topValue+= obj.offsetTop; obj= obj.offsetParent; } finalvalue = {‘left’: leftValue, ‘top’ : topValue}; return finalvalue; } In order to use this just use the following var curPos = getPosition(document.getElementById(‘divInQuestion’)); curPos.left is the postion left and curPos.top is the top…
Read more...Javascript game engine for jQuery
are closed

gameQuery is a jQuery plug-in to help make javascript game development easier by adding some simple game-related classes. It’s still in an early stage of development and may change a lot in future versions. The project has a Google Code page where the SVN repository of the project is hosted and a twitter page where you can follow the daily progress of the development.
Read more...
are closed