Skip to content
A boilerplate for jQuery plugins.
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
.editorconfig
.gitignore
LICENSE
README.md
gulpfile.js
package-lock.json
package.json

README.md

jQuery Boilerplate

A boilerplate for jQuery plugins. Just replace the word boilerplate where needed and start adding your custom jQuery plugin code.

Features

  • List of features

Compatibility

Tested to work with the latest versions of Firefox, Chrome, Safari, Opera, and Edge.

Setup

CSS

Include the CSS stylesheet.

<link href="dist/jquery.boilerplate.css" rel="stylesheet">

JavaScript

Include jQuery 1.7.1 or higher and the script.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="dist/jquery.boilerplate.js"></script>

Usage

Add the boilerplate class to an empty div or span with any of the following options setup. You can use data-* attributes to customize.

Default Settings

param: '' // parameter

Examples

Easily setup custom global defaults.

<script>
$.fn.boilerplate.defaults = {
  param: 'new'
};
</script>

Setup using CSS class.

<div class="boilerplate"
  data-param="example"></div>

Setup without using CSS class.

<div id="example"></div>
<script>$("#example").boilerplate({param: 'custom'});</script>
You can’t perform that action at this time.