Código:
funciona perfectamente, excepto con los elementos creados dinamicamente... $(function() {
$('div[class-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('class')).attr('class', $(this).attr('class-hover')).attr('class-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('<div />').attr('class', $(this).attr('class-hover'));
});;
});
He intentado esto:
Código:
pero lo único que logro es que la función deje de funcionar completamente $(function() {
$('div[class-hover]').on("hover", function() {
$(this).attr('tmp', $(this).attr('class')).attr('class', $(this).attr('class-hover')).attr('class-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('<div />').attr('class', $(this).attr('class-hover'));
});;
});

¿Que me esta faltando?
Saludos y gracias!



