code_junkie

How to save a user made HTML page?

Nov 13th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. var positions = new Array();
  2. function savePositionOfAllDivs() {
  3. $('div').each( function(){
  4. $this = $(this);
  5. id = $this.attr('id');
  6. position = $this.position();
  7. left = position.left;
  8. top = position.top;
  9. positions[id] = new Array();
  10. positions[id]['left'] = left;
  11. positions[id]['top'] = top;
  12. }
  13. }
Add Comment
Please, Sign In to add comment