using a selector that was loaded by .html
I am trying to load html into a div with jquery and then target a selector within the loaded html. It's not working! Here is what I have. I am new to jquery so it's probably something easy.
I am loading this into a div with the id "questions"
$('#questions').html('<strong>What kind of website do you need? </strong><br /><br><input type="radio" name="type" id="radio" value="informational">Informational<br><input type="radio" name="type" id="radio2" value="ecommerce">eCommerce<br><input type="radio" name="type" id="radio3" value="CMS">Content Management System<br><input type="radio" name="type" id="radio4" value="SN">Social Network');
Then I want the ids of radio, radio2, radio3 and radio4 to have a click event so I am trying this:
$('#radio, #radio2, #radio3, #radio4').click(function(){
alert("test");
});
Please help I have been trying for hours!