thats perfect! thanks comslash!
On Mar 9, 11:29 am, "comslash.com" wrote:
> Try this ...
>
> I did some testing and it seems that the $(this) was not selecting
> correctly as before and the :last was selecting only the last p tag on
> the page not every the last p tag in each article
>
> $('arti
Try this ...
I did some testing and it seems that the $(this) was not selecting
correctly as before and the :last was selecting only the last p tag on
the page not every the last p tag in each article
$('article>p:last-child').each(function(){
$(this).replaceWith($(this).html());
});
Expli
just the tags , leaving the content 'last paragraph'.
On Mar 9, 10:50 am, Karl Swedberg wrote:
> Do you just want to remove the and tags? Or do you want to
> remove the paragraph along with along with all of its contents? If the
> latter, then, yes, use ('article > p:last').remove();
>
>
Do you just want to remove the and tags? Or do you want to
remove the paragraph along with along with all of its contents? If the
latter, then, yes, use ('article > p:last').remove();
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Mar 8, 2009, at 7:44
Thanks, but that didn't work.
what does the .replaceWith($(this).htlm() do?
shouldn't we use something like 'remove' instead?
On Mar 9, 10:37 am, "comslash.com" wrote:
> Try this.
>
> $('article>p:last').replaceWith($(this).html());
>
> On Mar 8, 7:22 pm, carbon wrote:
>
> > is it possible to
Try this.
$('article>p:last').replaceWith($(this).html());
On Mar 8, 7:22 pm, carbon wrote:
> is it possible to use jQuery to strip a tag from a 'div' ?
>
> example:
>
>
> hello world
> last paragraph
>
>
> I would like strip the tags from 'last paragraph'.
6 matches
Mail list logo