javascript - Jquery function is not working on AJAX loaded elements -
don't throw rocks @ me. asked similar not long ago different. know have delegate event make them work on newly loaded element. if there no event delegate, function need use new elements?
let's suppose one:
function fixheight (x) { $(".test").height(x); };
now every time load content has elements class ".test", functions runs, won't affects new elements.
$.get( url, function(data){ //some code inserts data retrieved in existing element fixheight (x); }).fail(function() { //fallback code });
any ideas? thanks!
call function after append element dom
Comments
Post a Comment