Problems using the $(this) object

Problems using the $(this) object

This is just a noob question that I am sure anybody here will be able to help me with :). I was trying to do the following statement without success.
 
  1. $(document).ready(function() {
  2.       $('.my-object').css({
  3.             'top': $(this).height()
  4.       });
  5. });
When I do this the object moves to the height of the document not the ".my-object" object.
 
After a bit of reading I figure it is because the $(this) object wil only work on a function that triggers an event or something like that. The quest is... How can I do this without having to make refference to ".my-object" twice?
 
I thought somthing like this:
 
  1. $(document).ready(function() {
  2.       $('.my-object').function() {
  3.             $(this).css({
  4.                   'top': $(this).height()
  5.             });
  6.       }
  7. });

This is obviously not valid syntax... So what functions or syntax should I use to achive this?