javascript - How to execute Jquery for element returned from AJAX? -
i have function in js:
setrating(); and jquery ready body calling function:
$(function(){ setrating($('.ratings')); }); problem when html content ajax on page elements .ratings previous code not work.
seem need call setrating() in ajax response after getting content?!
you have call function after ajax done somethig this:
request = $.ajax({ ... }); request.done(function() { ... setrating($('.ratings')); }) because when function outside of request.done called before content created
Comments
Post a Comment