`.prepend()` works when there is one line of code such as `.prepend("<li>item1<li>")` but when I try to put a big block of code in it, such as multiple divs with classes etc, it doesn't work. I did however, see that you can pass it a function but I can't figure out the syntax.

If I need to use `$(selector).prepend(function(index,html))` instead please help me use this.

Edit: I got it working by passing a function into it, I still don't understand how to use the index,html parameters.