I have one html div on my jsp page, on that i have put one anchor tag, please find code below for that,
<div class=expandable-panel-heading>
<h2>
<a id=ancherComplaint href=#addComplaint
onclick=markActiveLink(this);>ABC</a>
</h2>
</div>
js code
$('.expandable-panel-heading:not(#ancherComplaint)').click(function () {
alert('123');
});
function markActiveLink(el) {
alert($(el).attr(id));
}
here I when I click on div I got alert with 123
message, its fine but when I click on ABC I want message I want to call markActiveLink
method.
what is wrong with my code? please help me out.