※ solution 1 :
<script>
jQuery(document).ready(function() {
$("#test li").on("click", function() {
alert($(this).text());
});
});
</script>
OR
※ solution 2 :
<script>
jQuery(document).ready(function() {
$("#test").on("click", "li", function() {
alert($(this).text());
});
});
</script>
thanks~!
reference :
https://stackoverflow.com/questions/6365255/jquery-onclick-event-for-li-tags
https://stackoverflow.com/questions/16707318/jquery-how-get-value-ul-when-click-on-li