Estou tentando remover uma class de um label criado dinamicamente pelo handlebars,
Porem não estou conseguindo acha o label com o id dele;
No console se passo o idLabel ele retorna o id certo.
"9-hb_usuario-label"
Mas quando tento fazer
$('form#hb_form').find(idLabel)
Para remover a class ele não faz.
$('form#hb_form').find('input').each(function () {
console.log(!$(this));
var idLabel = $(this).attr('name') + "-label";
if (idLabel != "undefined-label") {
if ($(this).valid()) {
$('form#hb_form').find(idLabel).removeClass('hide').addClass('hide');
}
else {
$('form#hb_form').find(idLabel.text()).removeClass('hide');
}
}
});