easter break

Posted in Photos | Tagged | Leave a comment

aron likes vegetables

Posted in General | Tagged | Leave a comment

aron – new photos

Posted in General | Tagged , , | Leave a comment

calculate div position

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 position

Posted in Computers, HTML/CSS, Web Development | Tagged | Leave a comment

Javascript game engine for jQuery

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.

Posted in Computers, Web Development | Tagged , | Leave a comment