Selector working only on one element.

Selector working only on one element.

I'm trying to create a new <div class="line"> when an <input type="text"> contained in the last  <div class="line"> loses focus. 

But new div blocks are created only when the an <input type="text"> in the first<div class="line"> loses focus. Please I need help urgently. Thanks.

This is my code:

  1. <script type="text/javascript">
  2.         $(function() {
  3.               $(':text:last').blur(function() {
  4.                 $('<div class="line"><span>data: </span><input type="text"/></div>')
  5.                 .appendTo($('#lineStack'));
  6.             });
  7.         }); 
  8.     </script>
  9. </head>
  10. <body>
  11.     <div id="lineStack">
  12.         <div class="line">
  13.             <span>data: </span><input type="text" />
  14.         </div>
  15.     </div>
  16.    
  17. </body>