Hi, So i've got this code:
$(document).on('click', ".buttonSelectAllOpt", function () {
alert(this.attr("id"));
});
and PHP:
$iii=1
while([...]){
echo "<span class=\"buttonSelectAllOpt\" id=\"buttonSelectAllOpt$iii\">Some text</span>";
$iii++;
}
I want THIS to be .buttonSelectAllOpt, but it seems that THIS reffers to document, and not to selector. Do You know if I can somehow call the selector?