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);
}
}
Function.prototype.apply should do the job:
function debug() {
if (settings.debug) {
console.log.apply(this, arguments);
}
}
Firebug adds a global variable named “console” to all web pages loaded in Firefox. This object contains many methods that allow you to write to the Firebug console to expose information that is flowing through your scripts.
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
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
(function ($) {
$.fn.pluginName = function (settings) {
settings = $.extend({
param: 'value'
}, settings);
return this.each(
function () {
var $this = $(this);
// plugin code here
}
);
};
})(jQuery);