I have a div I'm creating dynamically, with a unique id. I append() that to an area on the page.
Later, I try to reference that via $( '#id_here' ), but it returns nothing. Inspector in safari/chrome shows the existence and proper id of the element.
<script>
$( '#box' ).append( '<div><input id="id123" /></div>' );
//Later on in time...
function doingStuff(){
alert( $( '#id123' ) );//undefined
}
</script>
<div id="box">
</div>