Forum Moderators: open
thanks tell me if you need help understanding :D
how i go about say exporting the style that is set to each div.
Javascript is "unaware" of the style of of an element unless the style is inline
<div id="mydiv" style="width:100%">....
or you set it specifically when the page loads
document.getElementById('mydiv').style.width='100%';
... which may or may not be practical.
Interesting quirk [webmasterworld.com], follow the link in the last post for more explanation/examples, and coopster's links give another option.
and the div's are positioned absolute and the style is defined on the div itself, not using a class or anything. i just want to have the div's positioned and their coordinates according to their parent is shown when the user presses a button. when the user presses submit it will show each div's position from top - left. which i can do i just need to know how to get the left: px and top: px;
new Draggable('my_div', { onEnd : function(){
alert('top: '+$('my_div').getStyle('top')+', left: '+$('my_div').getStyle('left')+'');
} });
But, if you're using a different library (or custom code) you can't use this code exactly, but it might give you an idea of what direction to go.