I've implemented iCheck in Meteor 0.9.1.1 in the following way:
But Firebug tells me, that .iCheck is not a function.
I've just added jQuery with
Meteor add jquery
so I think I have the newest version of it, which should provide .iCheck. Or does it use an older version of jQuery?
This is how I got it working :
iCheck-master
from the github repository.icheck.js
to client/lib/
client/config/
(example : skins/flat/red.css
)public/img/icheck/
(example : skins/flat/red.png
, skins/flat/red@2x.png
)red.png
with /img/icheck/red.png
Once this is done you can now use iCheck
in your app like this :
client/views/icheck-test/icheck-test.html
<template name="icheck_test">
<label>
<input type="checkbox" name="foo">
Foo
</label>
</template>
client/views/icheck-test/icheck-test.js
Template.icheck_test.rendered=function(){
this.$("input").iCheck({
checkboxClass: "icheckbox_flat-red",
radioClass: "iradio_flat-red"
});
};
This process can be repeated for integrating nearly any jQuery plugin in Meteor. We could also use a package but at the moment customizing the package to pick a specific theme is a bit tricky.