You are probably trying to associate events with nodes that do not yet exist in the DOM. The best way to solve this problem is to associate with the listener that exists before the Ajax request, which is the ancestor (sometimes incorrectly called the "parent", which is only one level of the ancestor) of the received content. For example, given this markup on the page itself:
<div id="ajaxContainer">
</div>
"ajaxContainer" , . . live(), . delegate(), . on(), , delegate(), .
, , .on(), jQuery 1.7 +.
, Ajax , , divs, "". :
$(document).ready(function() {
$('#ajaxContainer').on('mouseenter', '.stars', function() {
$this = $(this);
});
});
: " ajaxContainer , " , divs ", , -".