trying to create a jquery plugin for a custom check-box
<p>I am trying to create my own styled checkbox jQuery plugin. What I want to do is hide the check-box which is working and append a span after the check-box but the span is not adding after the check-box. Why is this?</p>

<h2>SETUP</h2>

<pre><code>var checkBox1 = $("&lt;input type='checkbox'/&gt;");
$(checkBox1).genCheckBox();
$(divBGContainer).append(checkBox1);
</code></pre>

<h2>PLUGIN</h2>

<pre><code>(function($) {

    $.fn.genCheckBox = function(settings) {

        var def = {

            height: 15,
            width: 15

        };


        $(this).css("display", "none");


        var span = $("&lt;span/&gt;");
        $(span).insertAfter(this);

    }

})(jQuery);
</code></pre>
