Shortcut to function arguments

var ResetDefaultPasswordForm = function (options) {
    var options = options || {},
    editButton = options.EditButton || $(".edit-email-settings-button")[0],
    collapsibleArea = options.CollapsibleArea || $(".email-settings .collapsible")[0];

    $(collapsibleArea).hide();
}

Thanks to this post for the tip and all the other which I’m sure I’ll be posting examples of very soon.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: