end() method in jquery works but exhibits strange behaviour
<p>Below is the HTML Code</p>

<pre><code>&lt;div id="Parent"&gt;
            This is Parent Div
             &lt;p&gt; This is first child.&lt;/p&gt;
             &lt;p&gt; This is second child.&lt;/p&gt;
             &lt;p&gt; This is Third child.&lt;/p&gt;
        &lt;/div&gt;

&lt;input type="button" id="clickme" value ="click me" /&gt;
</code></pre>

<p>and here is jQuery code</p>

<pre><code>$('#clickme').click(function() {
    $('#Parent')
    .children() // 1st phase action on children begins here
    .css('color', 'blue')
    .end() //Here 1st phase action on children ends 
    .css({
        'color': 'red',
        'border-color': 'blue',
        'border-width': '3px',
        'border-style': 'solid'
    }) // Here 1st phase action on Parent completed
   .children() //2nd phase action on children begins
   .css({
        'border-color': 'red',
        'border-width': '2px',
        'border-style': 'solid'
    }).end() // 2nd phase action on children ends
    .css('font-style', 'italic'); //2nd phase action on parent begin/ends
});​
</code></pre>

<p>In the above jquery code i'm trying to apply different styles to children and parent.  Everything works fine except the italics style.  Can anyone explain me why this strange thing happens.  </p>

<p>sorry missed this -  i'm applying italics to parent but the children also gets changed. how to prevent this?</p>
