Hi,
I’m using the ian:accounts-ui-bootstrap-3 package and the {{> loginButtons}} helper to create a login dropdown in my menu bar. Everything works fine. But now I try to open this dropdown from another button. The code I tried is
'click [data-action="doSignIn"]': function (e) {
e.preventDefault();
if (Meteor.isClient) $("#login-dropdown-list").toggleClass('open');
}
The event fires if I click the anchor element with the data-action attribute but the dropdown doesn’t open. The code works if I just enter it into the console.
My guess is, that it has something to do with the encapsulation of templates, since the anchor and the dropdown are in different templates. But my understanding was, that $(…) would work for the whole page and only template.$(…) is restricted to the template.
So… anyone has an idea to solve this problem?
Thanks in advance!