Scope in jQuery(javascript)
<p>I simplified my code for next example. So, please don't be wondered why I'm using ajax here.</p>

<pre><code> &lt;!DOCTYPE&gt;
&lt;head&gt;
     &lt;style&gt;.not { background:yellow; }&lt;/style&gt;
    &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;
    $(document).ready(function() {
        $(".not").click(function(e){
            e.stopPropagation();
            alert('good');
        });
        $(".click").click(function(e){
            $.post('page2.php', 'q=1', function(data){
                $('body').append('&lt;p class="click"&gt;Click here to add new paragraph &lt;span class="not"&gt;[not here]&lt;/span&gt;&lt;/p&gt;');
            }, "json");
        });
    });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;p class="click"&gt;Click here to add new paragraph &lt;span class="not"&gt;[not here]&lt;/span&gt;&lt;/p&gt;
&lt;/body&gt;
</code></pre>

<p>New rows don't make any alert for class=not! It is inexplicably for me :'(</p>

<p>Thanks for unswer!</p>
