I'm trying to update the ID of a form element using jquery's attr() function. For debugging purposes.

I seem to be able to assign values to other elements, such as attr('title','test') works just fine. It's only when I want to update the ID.

My entire reason for wanting to update the ID, is that I am building form fields dynamically and need to assign them ID's.

```
<!DOCTYPE html>
<html>
<head>

<script src="http://code.jquery.com/jquery-latest.js"></script>
   <script>
   function addQuestion(){
   $('#question0Container').clone().appendTo('#questionArea');
   $('#add').attr('id','newid');
   alertText = $('#add').attr('id'); 
   alert("The id is:" + alertText);
   }
</script>
</head>
<body>

<div id="questionArea">
  <div id="question0Container">
  <textarea id="question0" name="question0"></textarea><p>Answers</p>
  </div>
</div>

<a href="#" onClick="addQuestion();" id="add" title="Add a question">add question</a>

</body>
</html>

```