Jquery apply event for ajax loaded content

Simply when we want to attach any event like click for ajax loaded content ,jquery fails to do this. So, here we have a new jquery function i.e on().It will handle this .Check Below example

	<script>
	$(document).on("click", ".search-results-suggest", function(){
	  		alert('ok');
		  $('.dwqa-search-form').find('.search-results-suggest').remove();
	  });
	  
	  </script>

On above example it is considered that data inside class ‘.search-results-suggest’ will be loaded through ajax.
Here we are attaching event ‘click’ for this class

Online Web Development Training,Video Tutorials