// with html stringjQuery('#parent').prepend('<span>child</span>');// or you can use jQuery objectjQuery('#parent').prepend($('#child'));// or you can use comma seperated multiple elements to prependjQuery('#parent').prepend($('#child1'),$('#child2'));
JQuery version: 1.4 onwards you can use callback function as the argument. Where you can get arguments as index position of the element in the set and the old HTML value of the element. Within the function, this refers to the current element in the set.
jQuery('#parent').prepend(function(i,oldHTML){// return the value to be prependreturn'<span>child</span>';});