Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OscarGodson/jQuery-Plugin-Skeleton
Simple jQuery plugin skeleton with MIT license
https://github.com/OscarGodson/jQuery-Plugin-Skeleton
Last synced: 4 months ago
JSON representation
Simple jQuery plugin skeleton with MIT license
- Host: GitHub
- URL: https://github.com/OscarGodson/jQuery-Plugin-Skeleton
- Owner: OscarGodson
- License: gpl-2.0
- Created: 2010-12-22T20:35:10.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-06T17:35:53.000Z (almost 13 years ago)
- Last Synced: 2024-10-28T15:09:03.504Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 160 KB
- Stars: 98
- Watchers: 4
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
#jQuery Plugin Skeleton
##What?
Simple, it's just a skeleton of a jQuery plugin that you can download, clone, fork, whatever. I'm putting it on Github mainly for myself. It also includes an MIT license at the top of the skeleton.##How?
Only thing you really have to do is edit the MIT license on the first line:Copyright (c) ,
And then name your plugin by replacing "`pluginname`" here:
pluginname: function(options) {
Lastly, you basically just start writing you plugin right under this line:
$this = $(this);
Make sure to use `$this` to reference the element selected from the plugin. Example, `$this` in this case:
$('#myelement').pluginname();
Would equal `#myelement`, or for multiple items selected, the current item the plugin is on while looping through.
##Note!
This plugin allows you to keep on chaining, so, for example:$('#myelement').pluginname().css({border:'1px solid blue'});
Would run `pluginname` name on `#myelement` then add a blue border to it after.
##Whats next?
A skeleton that includes ready-to-go functions and callbacks for AJAX based plugins.
##Found a bug?
Submit a bug report above or here: