[ACCEPTED]-jQuery .append outside tag-jquery

Accepted answer
Score: 15

You should be able to do this using after() instead 1 of append()

$('span.head-span').parent().addClass('head-h').after('<div class="clx" />')
Score: 4

If you want the div after the header, don't 1 append it, use the after method:

$('h1').after('<div class="clx" />');
Score: 3

Use the after method, like this:

$('span.head-span').parent().addClass('head-h').after('<div class="clx" />')

0

More Related questions