What do these lines of code mean?
<p>I have extracxted the code below from a plugin and Im struggling to understand certain lines of code like the extend,insertAfter and append methods used here.I didnt want copy and paste the whole code so I have made some changes,hope it doesnt confuse you guys?Would someone please explain these line of code</p>

<pre><code>    var $j = jQuery.noConflict();    
    $j("#myDiv").myPlugin({

                    ready: function() {
                        someFunction_1();
                    },
                    change: function(isOn) {
                        someFunction_2();           
                    }
                });


        $j.fn.myPlugin = function(arg) {

             if (typeof(arg) == "undefined" || typeof(arg) == "object") {

                this.hide().each(function() {

                     var data = $j.extend({ checkbox: $j(this), cancelClick: false }, typeof(arg) == "object" ? arg : { });

                     data.div = $j("&lt;div class='slider-switch-actual'&gt;&lt;/div&gt;").insertAfter($j(this).data("sliderSwitch", data));


                      data.div.append(


                        $j("&lt;img/&gt;")
                            .attr("src", "image.png")
                            .addClass("active")
                            .load(function() {
                            //code

                            });
)
                }
            }


            return this;
            }
</code></pre>
