Stick to microframework js is a behavior that you create through the javascript and run them through directly to an html tag.
JavaScript Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
css
demo
img
js
test
404.html
README.md
apple-touch-icon-114x114-precomposed.png
apple-touch-icon-57x57-precomposed.png
apple-touch-icon-72x72-precomposed.png
apple-touch-icon-precomposed.png
apple-touch-icon.png
crossdomain.xml
favicon.ico
humans.txt
index.html
index.html~
robots.txt
status

README.md

Stick.js

Experimental lib for control behavior directly in html tag attribute.

alt text

Simple to use:

In your tag, add the simple command '$.bahavior:message', for elements who return one message.

Examples:

Alert behavior

<p id="demo" data-stick="$.alert: My personal message !"> My tag ! </p>

The "data-stick", is a attribute of html5, but this lib to parse all tags marked, an are executed in browser who doesn't support this property.

Use an event of jQuery, for run this action:

'$("#demo").bind("load", function () { Stick.collect(this); });'

Done, His appointment was labeled.

Notes:

  • 'data-stick' - Identification of a behavior to send for stick.js;
  • '$.' - do one call to your object;
  • ':' - Separate your mark;
  • 'Stick.collect()' - Function to collect and research a method in a tag, who was marked;