Accessing DOM on dynamically loaded content
I have loaded a fragment into a div using the .load function. Is it possible to access the newly loaded content for editing?
- $("#outfitTopDesc").load(""+itemTop+" #productTitle, #productDescription, #productPrice");
var linkDiv = document.getElementById("productArticles");
var links = linkDiv.getElementsByTagName("a");
var test = document.getElementById("productAddToCart");
var formTest = test.getElementsByTagName("form");
- alert(formTest);
My alert dialog never apears.
I'm still new to javascript and jquery so bare with me.
Thanks