Thanks for the reply Brian,

I tried your way but didn work.
I looked at the docs again and it says it should be like this

jQuery(item_content).filter("#contentpane .contentpane > p, :first");

But unfortunately this also did not work.
As for th cloning of node, Well I am novice to javascript and have
never used it before, infact don't know how to use this function.

Thanks again. Please do write if you have any more suggestions.



On Apr 20, 11:45 am, "Brian Miller" <[EMAIL PROTECTED]> wrote:
> Quick-n-dirty way: use .eq(0).innerHTML instead of .eq(0) .
>
> But, what might probably work better is if you cloned the node and
> inserted it into #myContent (assuming that it winds up as valid DOM that
> way).
>
> - Brian
>
> > Hi
> > this is what I have
>
> > jQuery.get(item_link,function(item_content){
>
> >    var new_content =
> > jQuery(item_content).filter("#contentpane .contentpane > p").eq(0);
>
> >    jQuery("#myContent").html(new_content).slideDown("slow");
> > });
>
> > What I imagine this code should be doing is extract the first
> > paragraph from the item_content and fill the #mycontent with this
> > first paragraph.
>
> > But what I get it nothing in this #mycontent.
>
> > Can someone please point me to what I am I doing wrong. I intent to
> > extract the first paragraph from
> > #contentpane .contentpane element.
>
> > thanks

Reply via email to