Below is the call and where the code passed into the call would place
the content.

$('#aP').before();
<p id="aP">
$('#aP').prepend();
lorem ipsim dolor sit amet...
$('#aP').append();
</p>
$('#aP').after();

On Apr 18, 11:49 pm, MauiMan2 <cmzieba...@gmail.com> wrote:
> Does jQuery provide a way to append an element immediately before the
> closing tag of another element? For instance, say I have the following
> paragraph element:
>
> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean
> adipiscing gravida leo. In hac habitasse platea dictumst. Phasellus
> auctor odio id ligula. Morbi in risus et nulla vehicula blandit.
> Quisque varius, enim eget interdum cursus, risus est auctor nisi, vel
> laoreet magna orci ac neque.</p>
>
> But that I would like to add a link in right before the end to obtain
> this:
>
> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean
> adipiscing gravida leo. In hac habitasse platea dictumst. Phasellus
> auctor odio id ligula. Morbi in risus et nulla vehicula blandit.
> Quisque varius, enim eget interdum cursus, risus est auctor nisi, vel
> laoreet magna orci ac neque.<a href="http://www.hotbot.com";>Remember
> Me?</a></p>
>
> Is there a way to do that? If not, is it possible to make a plugin for
> that?

Reply via email to