Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting and using options
$.fn.footnote = function (options) {
// This is the easiest way to have default options.
var settings = $.extend({
// These are the defaults.
color: "blue",
referencesLocation: "#references"
}, options);
// use the options
$(settings.referencesLocation).css("color", settings.color);
//
return //..
}
$("#myParagraph").footnote({
color: "orange",
referencesLocation: "#theReferences"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment