This is jquery, code, it always returns ID = 1 when you click on "GENERAL" or inner section like "CSS ISSUES". While i am trying to get ID of the Li clicked.
<ul id="faq_list" class="list-unstyled">
<li data-type="parent" data-value="1">
<a href="javascript:;">General</a>
<div class="subdata" id="target_1">
<ul>
<li data-type="parent" data-value="5">
<a href="javascript:;">CSS Issues</a>
<div class="subdata" id="target_5"></div>
</li>
</ul>
</div>
</li>
</ul>
Here is JQUERY CODE
$(document).ready(function(e) {
$("li").on('click',function(e) {
var id = $(this).attr('data-value'); alert(id);
load_data(id);
});
});