I am using jquery 1.3.(x) (don't remember the exact version name).
I have a variable holder
that contains elements.
I would like to add a div at the n-1 position inside holder.
In jquery 1.4 I can do holder.children().last().before('<div />');
.
How can I do it using jquery 1.3?
Try this:
$("<div>New DIV</div>").insertBefore($(":last-child", holder));
Working Example: http://jsfiddle.net/Chandu/u94gV/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With