Simplify some stuff thanks to live()

This commit is contained in:
Eric Allen 2009-10-17 00:03:12 -04:00
parent 290fa3351c
commit f9d37d1d90
4 changed files with 4 additions and 14 deletions

View file

@ -86,14 +86,6 @@ var TracksForm = {
}
}
var TodoBehavior = {
enableToggleNotes: function() {
$(".show_notes").unbind('click').bind('click', function () {
$(this).next().toggle("fast"); return false;
});
}
}
$.fn.clearForm = function() {
return this.each(function() {
var type = this.type, tag = this.tagName.toLowerCase();
@ -316,8 +308,11 @@ $(document).ready(function() {
/* for toggle notes link in mininav */
$("#toggle-notes-nav").click(function () { jQuery(".todo_notes").toggle(); });
/* show the notes of a todo */
TodoBehavior.enableToggleNotes();
$(".show_notes").live('click', function () {
$(this).next().toggle("fast"); return false;
});
/* fade flashes and alerts in automatically */
$(".alert").fadeOut(8000);