Prepend vs Before

Prepend vs Before


Hi,
I'm puzzled why this script works:
$('.toggle').prepend('<a href="#" class="toggler">Collapse</a>').click
(function() {
    alert('toggle');
});
But this one doesn't:
$('.toggle').before('<a href="#" class="toggler">Collapse</a>').click
(function() {
    alert('toggle');
});
I don't understand why!
Thanks for looking.