I'll try to clarify this as much as possible because I believe the answer is going to be something very simple I'm overlooking.
My HTML:
<ul class="nav nav-tabs">
<li class="profile-info active"><a href="#">Personal Info</a></li>
<li class="profile-groups"><a href="#">Groups</a></li>
<li class="profile-commitments"><a href="#">Commitments</a></li>
</ul>
My Helper:
Template.Profile.helpers({
'personal':function(){
if ($('.profile-info').hasClass('active')) {
return true;
} else {
return false;
}
}
});
I just want 'personal' to return TRUE. However it always returns false no matter what type of "IF" statement I give it.
Aucun commentaire:
Enregistrer un commentaire