Skip to content

jQuery Auto discover on Meteor 1.6 cause problem  #3

Description

@julien66

Hi,

Thanks for the nice component.
Syncing bootstrap-toggle with Session sure is a good idea!

I stumbled upon a bit of trouble while trying to get things to work on Meteor 1.6.
My problems were :

  • Toggle was not syncing the variable.
  • Toggle was not taking any options.

It turns out it was related to the jQuery plugin autoDiscover feature.
data-toggle='toggle' on the input was allowing jQuery to initialize the component.
Apparently this was done AFTER the call on Template rendered and was causing to set everything back as default.

I get it to work by remplacing the attribute data-toggle with the value "customToggle" and obviously finding itslef on the rendered function. jQuery now let the Template initialize the component alone and things are working as expected.

I have done two pull request.
I did it by hand via github ui. Testing before merging is mandatory.
Best Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions