@Neewd wrote:
Hey,
It's maybe a newbie question but I'm looking for a solution since this morning.
I've two inputs, and I want to add or remove a class when the focus, or the blur is triggered.
But when I try do do this, it seems that the DOM isn't loaded and the inputs doesn't exist.Ember.$(".input-group.transparent").children('input').blur(function () { Ember.$(this).parent().children('.input-group-addon').removeClass('input-focus'); }); Ember.$(".input-group.transparent").children('input').focus(function () { Ember.$(this).parent().children('.input-group-addon').addClass('input-focus'); });
<div class="input-group transparent"> <span class="input-group-addon"> <i class="fa fa-key"></i> </span> {{input type="password" value=model.password class="form-control" placeholder="Mot de passe"}} </div>
I've tried with renderTemplate, init but nothing work.
Anyone can help me ?
Cheers.
Posts: 1
Participants: 1