bind custom function to dynamically loaded elements
<p>I have written a simple function:</p>

<pre><code>function inputChanged()
  {
    $('input').change(function(){
      $(this).addClass('changed');
    });
  }
</code></pre>

<p>I am adding forms dynamically to a div and would like to bind the function to the added forms, I have tried like this:</p>

<pre><code>// add a new form on click
$('.addForm').live({
    click: function(e) {
        e.preventDefault();
        $("&lt;div&gt;").load("directory/theform.html", function() {
            $("#theForms").prepend($(this).html());
                    // i am calling the function here...
            $("#theForms form:last").validate().inputChange();
        });
    }
});
</code></pre>

<p>This is not working for me... How can I bind this function to the dynamically loaded forms?</p>
