Hello World+ jQuery Plugin
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
src
README.md

README.md

A hello world jQuery plugin that provides structure

There are many different approaches to writing jQuery plugins, but this is one that I found useful. It should provide a little insight of how to structure a jQuery plugin.

Usage

  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  2. Include plugin's code:

    <script src="../src/jq.hello.js"></script>
  3. Call the plugin:

    $("#element").hello({
    	name: '{Your Name}'
    });

Structure

Basic project structure. Nothing crazy here

├── demo/
│   └── index.html
├── src/
│   └── jq.hello.js
├── README.md