Accessing to an element just added with jquery

Accessing to an element just added with jquery

I use jquery to add a form with several fields at a div:
myhtml = "";
myhtml += "<form id='myform'>";
myhtml += "h = <input type='text' id='h' name='h' size='30' value=''/>";
myhtml += "<input type='submit' value='modifica' /></form>";

$("#mydiv").html(myhtml);


now I'd want to change the background-color of my form just added:
$("#myform").css("background","#FF0");


but it doesn't work
I think that the added form is not selectable by jquery (jQuery doesn't recognize the new id form?), or i have not idea how to do it. Anybody can help me, please?