I'm trying (rather unsuccessfully) to fill a div that was created by jquery. I feel like the code should work: any hints or solutions?
Here's my html: <div class="test_area"> <div class="foo"></div> <div class="fooAlt"></div> </div> Here's my javascript: $(document).ready(function(){ $('.foo').append('<a href="#"><img src="1.gif" class="1" alt="1st image" /></a>'); $('.foo a img').click(function(event){ event.preventDefault(); $('.foo').attr('alt'); }) });