Add "enable" and "disable" jQuery functions

Handles (un)setting the disabled attribute and adding/removing the
'disabled' class
This commit is contained in:
Robert Speicher 2012-09-09 07:08:13 -04:00
parent 3b89f14090
commit ad1aa517c7
2 changed files with 16 additions and 7 deletions

View file

@ -25,11 +25,11 @@ var NoteList = {
$(this).closest('li').fadeOut(); });
$(".note-form-holder").live("ajax:before", function(){
$(".submit_note").attr("disabled", "disabled");
$(".submit_note").disable()
})
$(".note-form-holder").live("ajax:complete", function(){
$(".submit_note").removeAttr("disabled");
$(".submit_note").enable()
})
disableButtonIfEmptyField(".note-text", ".submit_note");