Reinitiate user defined jquery function on page resize
<p>I've inherited some code from a previous developer who is now no longer contactable. I'm trying to get the function to reinitialize when the page is resized, but can't seem to get it to do so.</p>

<p>I'm a bit of a jQuery noob, which doesn't help.</p>

<p>The function is below:</p>

<pre><code>(function ($) {
    $.fn.setWidth = function (o) {
        var vWidth = $("#wrapper").outerWidth(false) - 40;
    };
})(jQuery);
</code></pre>

<p>I've tried the following to reinitialize it when the page resizes, but currently nothing happens. No errors are generated either.</p>

<pre><code>$(window).resize(function() {
     $().setWidth();
});
</code></pre>

<p>Any pointers would be gratefully received.</p>

<p>-Edit-</p>

<p>Sorry, I should point out there is more code within the setWidth function, but I trimmed it out. I'm just trying to get the main function to reinitialize on resize.</p>
