Add "enable" and "disable" jQuery functions
Handles (un)setting the disabled attribute and adding/removing the 'disabled' class
This commit is contained in:
parent
3b89f14090
commit
ad1aa517c7
2 changed files with 16 additions and 7 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue