With the using of the appendTo
in the line
$("#instructorTemplate").tmpl(self.TableDetailList())
.appendTo("#instructorsList");
you are always appending to existing table so the new entries always added to the end and the old ones never removed.
So you need to empty()
your target first and then append the new values:
$("#instructorsList")
.empty()
.append($("#instructorTemplate").tmpl(self.TableDetailList());
Or you use the html()
method to replace the whole content of the #instructorsList
$("#instructorsList")
.html($("#instructorTemplate").tmpl(self.TableDetailList());