I have a simple OL Append via JQuery which contain hidden input inside Span.
I want to test get the value using on click and show on alert
My problem is i always get undefined when clicked
$ol.append(
'<li>'
+ '<p class="diplome" style="color:white">' + "test" + '</p>'
+ '<span id="t_id" class="_point point">' + '<input name="n_name" id="id_name" class="class_name" style="visibility:hidden;" value="'+80 + '" />' + '</span>'
+ '</li>'
);
$('body').on('click', '.class_name', function () {
var data= $(this).val();
alert(data);
});