Denis Barushev

Email: barushev@gmail.com

Passing All Arguments from One JavaScript Function to Another

Function.prototype.apply should do the job:

function debug() {
    if (settings.debug) {
        console.log.apply(this, arguments);
    }
}
Calling preventDefault during any stage of event flow cancels the event, meaning that any default action normally taken by the implementation as a result of the event will not occur. Gecko DOM Reference
If child is a reference to an existing node in the document, appendChild moves it from its current position to the new position (i.e. there is no requirement to remove the node from its parent node before appending it to some other node). Gecko DOM Reference

A Simple jQuery Plugin Skeleton

(function ($) {
    $.fn.pluginName = function (settings) {
        settings = $.extend({
            param: 'value'
        }, settings);

        return this.each(
            function () {
                var $this = $(this);
                // plugin code here
            }
        );
    };
})(jQuery);

http://gist.github.com/12656