Icheck.js And Meteor App
I'm trying to integrate iCheck on an Meteor app. Have anyone a clue how to integrate another JS libraries on Meteor apps?.
Solution 1:
This is what I did.
I added the js file (jquery.icheck.min.js) to client/lib to make it load first then I put the css (skins folder) in the public/ folder at the app root.
In order to load the skin (css files) I added this line to the app.html at the <head>
<link href="/skins/minimal/blue.css" rel="stylesheet">
To initialize the iCheck on my controls I put this function on Template rendered function:
Template.dataForm.rendered = function(){
if(!this._rendered) {
$('input').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue',
increaseArea: '20%'
});
};
and voila.
Post a Comment for "Icheck.js And Meteor App"