Cannot reach $(this) from within $().data()
<p>I'm trying to set the class of my element inside a data object of the same element, but it keeps returning undefined.</p>

<pre><code>$(this).data({
            orgSize:{ // Write all the sizes as data. For future reference.
                width: $(this).width(), //returns the width just fine!
                height: $(this).height() //returns the height just fine!
            },
            orgClass: function(){
                cl = $(this).attr('class');
                if(cl){
                    return ' ' + cl;
                }else{
                    return ' somethingelse';
                }
            } //returns undefined
        });

        console.log($(this).attr('class')) //returns the class
</code></pre>

<p>edit: The problem is within the orgClass.</p>
