jquery click doesnt work on ajax generated content
<html>
<head>
<title>snd<title>
</head>
<body>
<div>
<button class="my-click" >Click Me</button>
</div>
<script type="text/javascript">
//if use class name on click using .(dot) to refer the class
//if use id name on click using # to refer the id
$(document).on('click','.my-click',function(){
alert('hai');
});
</script>
</body>
</html>




0 comments:
Post a Comment