I am developing my website with ajax and php scripts. My web page is hanging by the following ajax script. How should I want modify the script to avoid hanging
<script>
$(function(){
$('#popModal_ex2').click(function(){
$('#popModal_ex2').popModal({
html : function(callback) {
setInterval(function() {
$.ajax({url:'notification_message.php'}).done(function(content){
callback(content);
}, 4);
});
}
});
});
});
</script>