Run file .js after logging user


#1

Hi. Is it possible to run .js file after logging user.

<template name="publicLayout">
    <div class="wrapper public-layout">
          {{> _publicHeader}}
              <div class="container">
                {{> yield}}
            </div>
          {{> _publicFooter}}
     </div>
</template>

Template.publicLayout.rendered = function() {
    $('.sidebar-toggle').each(function() {
        var group = $(this);
        $(this).find(".btn").click(function(e) {
            group.find(".btn.active").removeClass("active");
            $(this).addClass("active");
            e.preventDefault();
        });
    });
}

#2

I can’t figure out how the code you posted relates to your question. What have you tried, what do you expect to happen, and what is happening that you’re not expecting? Some additional details would be helpful, we can’t read your mind :smile:


#3

http://devdocs.io/meteor/index#accounts_onlogin