joshorig / meteor-bootstrap-3-switch

Bootstrap3 switch icons
2 stars 2 forks source link

doesnt work #1

Open pociej opened 10 years ago

pociej commented 10 years ago

i can see only normal checkbox and error :

Exception from Deps afterFlush function: $.fn.bootstrapSwitch/methods.init/</<@http://localhost:3000/packages/bootstrap-3-switch.js?34ee8fdc76818d78a06e07ecac073edc9451b72c:72 .each@http://localhost:3000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:417 $.fn.bootstrapSwitch/methods.init/<@http://localhost:3000/packages/bootstrap-3-switch.js?34ee8fdc76818d78a06e07ecac073edc9451b72c:71 .each@http://localhost:3000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:417 jQuery.prototype.each@http://localhost:3000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:170 $.fn.bootstrapSwitch/methods.init@http://localhost:3000/packages/bootstrap-3-switch.js?34ee8fdc76818d78a06e07ecac073edc9451b72c:55 $.fn.bootstrapSwitch@http://localhost:3000/packages/bootstrap-3-switch.js?34ee8fdc76818d78a06e07ecac073edc9451b72c:441 Template.admin_settings.rendered@http://localhost:3000/client/admin/admin_settings.js?5572250a99c9a3fc017c018f55702d220751e8ea:28 Template.define/partial/html</html<.rendered@http://localhost:3000/packages/templating.js?5944cd5e16b26fbf83959a0fe92d7754029a624d:181 scheduleOnscreenSetup/</<@http://localhost:3000/packages/spark.js?742c715b73fac26c16ad433118b87045bc5658ff:443 _.forEach@http://localhost:3000/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18:156 scheduleOnscreenSetup/<@http://localhost:3000/packages/spark.js?742c715b73fac26c16ad433118b87045bc5658ff:441 .flush@http://localhost:3000/packages/deps.js?e2b721ea91f036193799d30ccdf652423602aa5c:297

do you know what is the problem ?

joshorig commented 10 years ago

Not without seeing your code.

Can you send me your html and also your.js snippets so I can replicate?

You need to ensure your switch has the class make-switch in your html and also in your .js that the templates rendered function has the following:

$('.make-switch').bootstrapSwitch();

tlau commented 10 years ago

I don't get an error, but I also don't get the CSS styling. My switch looks like a normal checkbox.

My HTML:

<input class="make-switch" type="checkbox" id="doorOpen">

In my Template.main.rendered:

  $(".make-switch").bootstrapSwitch();
pociej commented 10 years ago

tried one more time now : typeError: Cannot call method 'indexOf' of undefined

dnohales commented 9 years ago

Same thing happening to me.

archonic commented 9 years ago

I also can't get it working.

Kostanos commented 8 years ago

Same error here