OOP for your jQuery plugins
Switch branches/tags
Nothing to show
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.
deps
examples
lib
t
.gitmodules
LICENSE.md
README.md

README.md

##plOOgins

OOP for your jQuery plugins.

Features

  • allows You to write true OOP code to use as your jQuery plugins
  • stores a plugin instance in jQuery.data for every selected element, once instantiated the plugin will remain there for further use
  • unlike original jQuery, plugin methods work for all selected elements (not only for the first one)
  • but You decide if You want to provide chaining or not

HOWTO

See also examples and tests for detailed use cases.

Common use case (with chaining)

ploogins.register(YourPluginName);

var plug = $('.someClass').YourPluginName();

plug.someMethod().css('color', 'red');

BIG Thanks

https://github.com/krzyzak00 - for borrowing his inheritance mechanism and helping with bugfixes

https://github.com/Sahadar - for providing good ideas

License

Licensed under the MIT license.