$('.myDiv').click(function(event){ $.ajax({ url: '', dataType: 'json', success: function(json) { for (var i = 0; i < json.length; i++) { var response = json[i]; $('.result_new').append('<p>' + response.name + '</p>'); } //$('.content').append('<p>' + response.total + '</p>'); } }); })
event.stopPropagation()
isn't preventing the ajax call from being called repeatedly. Is there a function for this in Jquery?