how to call user defined jquery function from ajax loaded page
<p>I have 2 pages</p>

<ul>
<li>index.php </li>
<li>login.php</li>
</ul>

<p>From the index.php make a ajax call and get the login.php</p>

<p>index.php:</p>

<pre><code>    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; 
    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; 
    &lt;head&gt; 
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; 
    &lt;title&gt;Home Page&lt;/title&gt;
    &lt;script src="./js/jquery.js"&gt;&lt;/script&gt;
        &lt;script&gt;
        $(document).ready(function(e) {
            $("a").click(function(e) {
                var model= $.ajax({
                    url: $(this).attr('href'),
                    cache:false,
                    type: "GET",
                    dataType:"json"
                });
                model.done(function(data){
                    $("#body").html(data.bodyy);
                    e.preventDefault();
                });
            });     
                $("form").submit(function(e) {
                            alert("Triggered");
                });
        });

    &lt;/script&gt;



    &lt;body&gt;
    &lt;div id="body"&gt;&lt;a href="login.php"&gt;Login&lt;/a&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and here is the ajax page: login.php</p>

<pre><code>&lt;?php
    $body='&lt;form class="form-signin" action="#" method="post" id="login"&gt;
        &lt;h2 class="form-signin-heading"&gt;Please sign in&lt;/h2&gt;
        &lt;input type="text" class="input-block-level" placeholder="username" name="username"&gt;
        &lt;input type="password" id="password" class="input-block-level" placeholder="Password" name="password"&gt;
        &lt;label class="checkbox"&gt;
          &lt;input type="checkbox" value="remember-me"&gt; Remember me
        &lt;/label&gt;
        &lt;table&gt;&lt;th&gt;
        &lt;button class="btn btn-large btn-primary" type="submit"&gt;Sign in&lt;/button&gt; &lt;/th&gt;&lt;th width="5%"&gt;
        &lt;h3&gt;  or  &lt;/h3&gt;&lt;/th&gt;&lt;th&gt;
         &lt;a class="btn btn-large btn-primary" href="./registration.php" &gt;Register&lt;/a&gt;&lt;/th&gt;&lt;/table&gt;
      &lt;/form&gt;
      &lt;script&gt;
        &lt;/script&gt;
';
    $data= array(
        'bodyy' =&gt; $body,
        );
        echo json_encode($data);
?&gt;
</code></pre>

<p>when i submit login form the <code>$("form").submit(function(e)</code> not called.
i get this problem when i call this from ajax loaded page</p>
