I was playing with a script that  had used innerhtml or .load()  to fill in a
div tag.

The code placed inside the tag was

"the is info placed in the orginal tag <div  id="newcode"> Please
click me</div>"

Now I have a script  in the header,


$("div#newcode").click(function(){alert('this works');});

of course this alert box never gets activated.


I assume it doesn't work because the code is not truely part of the pages' dom.

So how do I get this to work and have it part of the dom.

thanks in advance
How can I make this work and have this new code p



 ********************************************************
Everyone is equal and everyone is the best at everything.  ---
Principal Skinner

"Success is a lousy teacher. It seduces smart people into thinking
they can't lose."       -Bill Gates

99% of the time, in my experience, the hard part about creativity
isn't coming up with something no one has ever thought of before. The
hard part is actually executing the thing you've thought of.  -- seth
godin


********************************************************************************************

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to