The Codesee The Codesee - 1 year ago 68
HTML Question

Multiple elements with same class - only insert after last one

I am using the JQuery function

function to insert an element after another element.

The page structure looks like this:

<div class="example"></div>
<div class="example"></div>
<div class="example"></div>

I am using this line of code to insert a


The issue is that
is being inserted after every
<div class="example"></div>
element - I only want it to be inserted after the last
<div class="example"></div>

Answer Source



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download