jQuery Basic Plugin - Loading from another page
<p>I am very inexperienced with jQuery plugins, and only mildly experienced in jQuery itself.</p>

<p>I am trying to create a jQuery plugin that allows me to fill a <code>div</code> with content from another page with GET variables in the URL depending on the parameters that are passed to it.</p>

<p>Eg <code>$('#mydiv').getstuff(1,2,3)</code> would load it with code from <code>engine.php?a=1&amp;b=2&amp;c=3</code>.</p>

<p>Here is my code so far - I know there are problems with the way it takes in parameters but other than that I can't figure out why it's not working.</p>

<pre><code>&lt;script type="text/javasctipt" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    (function($){
        $.fn.extend({ 
            //pass the options variable to the function
            bookmark: function(options) {
                var defaults = {
                    number: 5,
                    order: 1,
                    user: '',
                };

                var options = $.extend(defaults, options);

                return this.each(function() {
                    var o = options;
                    var obj = $(this);
                    var container = $("div", obj);

                    $("div", obj).load("thing.php?number="+o.number+"&amp;order="+o.order+"&amp;user="+o.user);
                });
            }
        });
    })(jQuery);

    $(document).ready(function() {
        $('#thing').bookmark(1,2,3);
    });
&lt;/script&gt;

&lt;div id="thing"&gt;&lt;/div&gt;
</code></pre>
