There's a javascript frameworks forum on here that you can ask jquery questions in.
You should take the onclick out of your anchor tag, and handle the click event when you create it. There's probably a better way than this, but this works:
Code:
var count = 0;
$(document).ready(function(){
$('p#add_field').click(function(){
count++;
$('#container')
.append(
$('<select>')
.attr('id', 'field_' + count)
.attr('name', 'fields[]')
.append('<?php echo javascript_escape($course_block); ?>')
)
.append(
$('<a>').addClass('select_remove').attr('href','#').text("Remove")
)
$('a.select_remove').unbind('click').click(function(){
$(this).prev('select').remove();
$(this).remove();
return false;
});
});
});