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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -