Immediate–Invoked–Data–Expressions (IIDE) for jQuery Methods & Plugins
Inspired by this blogpost by @toddmotto I wrote this simple jQuery plugin to invoke any jQuery.fn
or jQuery.plugin
method via HTML5 data attributes.
The goal is to make it more comfortable to init plugins right on its corresponding DOM element.
Read more about the theory here: IIDE, Immediate-Invoked-Data-Expressions, data-init and using HTML5 to call your JavaScript/jQuery. I'm also write a blog post soon about this, be patient.
<div
data-init="animate"
data-options='[
{
"right": 800,
"top": 0
}, 5000 ]'>
</div>
Check out the examples for more details.