Ryan Christiani wrote:Well I would like to try and learn the basics of javascript instead of just relying on jQuery, but yeah, you were saying in another one of my threads to save time and effort using jQuery.
Yes, it is a good idea to learn the basics -- that way you understand what's going on.
But when push comes to shove, make your life easier with jQuery (or other library of your choice)!
Lets say I want to keep going like this, how exactly do I inject it into the DOM? I assumed that is what the insertBefore method did, you provide it with the new element and the element to have it come before.
What I see missing, is that you are creating an element, but never putting it into the DOM.