I am dynamically adding a class to my code using Jquery's .attr('class', 'show')
. But when I use .each()
function like this:
$('.show a').each(function() {
alert(0);
});
it doesen't work.
I works when I added the 'show' class manually.
How can I do this dynamically?