Target Element After Added to DOM Inside Window Resize
I can't seem to target an element created by ajax and then added to the DOM. The targeting is done when a window resize is done.
My code:
- $(window).resize(function() {
- var mythis = $('#wrapperdiv #newdiv');
- console.log('Mythis: ' , mythis); // Returns - n [] ie. not in dom
- });
Is there an easy way to target mythis ?