Using bootstrap-switch with meteor


#1

Hi, I’m new to meteor, I love it so far…I’m trying to use the ‘bootstrap-switch’ package (ie meteor add mrt:bootstrap-switch) but so far with no joy. Has anyone used this package successfully?

Thanks


#2

Its an old meteorite package so probably needs a review.

What isn’t working for you?


#3

Hi, thanks for replying. It looks like the css isn’t being applied. I’ve used bootstrap-switch outside of meteor and it’s great but I just can’t get it to work with meteor. Checkboxes have the has-switch class applied after doing this…

Template.employee.rendered = function () {
$(this.find(’.toggle-in’)).bootstrapSwitch();
}

… but no css goodness.

I’ll probably look for an alternative.

Thanks again.


#4

Hi, I just looked at the source of the package.

The package provides bootstrap-switch v1.9.0 whereas the current version is v3.x.x So its an old package that is unlikely to work.

Could you do me a favour and log into atmosphere and hit the flag button on it. I’ll do the same. If a package gets a few flags other users get notified when they try and use it.

As for alternatives. You can manually link the css and js file in within a block like you would for a non-meteor project. Just place the files in the public folder.


#5

Flagged - thanks for your help.