$(".form-horizontal").find(".answer").each(function() { $(this).attr("type","radio"); alert($(this).attr("type")); });