I'm creating my first jQuery plugin to easy get needed data without repeating the same scripts for different elements. I'd like to my plugin could get things like: width, height, position and more of specified element and his parent (I'll need them to use later) in forms like:

    $('element').myPlugin(); // will return all
    $('element').myPlugin(width); // will return only width
    $('element').myPlugin(width, height); // will return width and height
I don't know the way how to get data from plugin in proper form. I tried to figure it out but always get "undefined" or [Object object] as result. I'll be grateful if someone could give me example how my "[[?]]" part should look:

    	$.fn.myPlugin = function(options) {
    		var defaults = {
    			width: this.width(),
    			height: this.height(),
    			parentWidth: this.parent().width(),
    		var options = $.extend(defaults, options);
        return this.each(function () {
    	var $this = $(this);