I added a span with a class, but .click does not trigger.
Adding a span class code
var TA = '<span class="TS" id="'+$('#TT').attr('value')+'" style=" color:#fff; margin-left:5px; font-family:arial; font-size:12px">* '+$('#TT').attr('value')+'</span>';
$('#QLT').append(TA);
This adds a span .TS to a div .TX. I want to trigger .TS using .click, the code
$('.TS').click(function() {
alert("ok");
});
But this does not trigger. What is wrong, Appreciate all assistance.
Thanks Jean