The problem is not that difficult, I just can't get my head around it (noob at Jquery). The problem all comes down to when clicking a <span>
getting it`s text and print it;
$('span').click(function(){
var t= ???;
alert(t);
});
How can i get it's text??? NOTE: Each span does not have an id or class, any span clicked must output a message. Each span is generated dinamic via PHP and I need it's value.
$('span').click(function(){
var t = $(this).text();
alert(t);
});
See a demo at jsFiddle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With