How to get click event of the <a>
tag using jquery when i access click event it is not accees please help.
This is my script to add data using append method
$.ajax({
type: "POST",
url: URL,
data: datastring
}).done(function(data) {
var status = JSON.parse(data);
for (var i in status) {
$("#loadmystatus").append(
"<div style='float: right; margin-top: 5px;'>" +
"<label style='font-weight: 500;' class='lblsizr'>2:45 am 02/04/2016</label>" +
"<div class='dropdown user-menu' style='margin-right: 16px;'>" +
"<button class='iconsiz' id='dd-user-menu' type='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>" +
"<img src='image/icon/menu option.png' alt='' style='height: 6px; margin-left: 8px;'>" +
"</button>" +
"<div class='dropdown-menu dropdown-menu-right' aria-labelledby='dd-user-menu'>" +
"<a class='make dropdown-item' name='make' id='make'>" +
"<span class='font-icon glyphicon glyphicon-thumbs-up'></span>" +
"Make current status" +
"</a>" +
"<a class='dropdown-item' href='#'>" +
"<span class='font-icon glyphicon glyphicon-remove'></span>" +
"Remove" +
"</a>" +
"</div>" +
"</div>" +
"</div>" +
"<br>" +
"<div style='border-radius: 10px;'>" +
"<label>" + status[i].userstatus + "</label>" +
"</div>" +
"<hr>"
);
}
});
this is my scritp to access tag even did nt work
<script type="text/javascript">
$(document).ready(function()
{
$('#make').on('click', function(event) {
alert("hello");
});
});
please help for that