Grow your CSS skills. Land your dream job.

[Solved] Append?

  • # February 15, 2010 at 4:44 am

    What I want to do is have this in my html:

    Code:

    This is my javascript:

    Code:
    $(document).ready(function(){
    $(“a.name”).append(‘

    ‘);
    })

    The problem I am having is that it puts the <div class="clear"></div> inside the <a> tag. How would I get it to be directly afterwards?

    # February 15, 2010 at 9:16 am

    Just in case anyone is interested, I was messing around with the code and all I had to change was ‘append’ to ‘after’.
    So the jquery looks like this:

    Code:
    $(document).ready(function(){
    $(“a.name”).after(‘

    ‘);
    })

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".