-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed to an event listener pattern
- Loading branch information
tfarrell-vz
committed
Oct 20, 2014
1 parent
67ee18d
commit 2e1d27b
Showing
2 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
/*global $, test, equal */ | ||
/*global jQuery */ | ||
jQuery(document).ready(function ($) { | ||
|
||
$(document).ready(function () { | ||
$('input').on('keypress', function() { | ||
$('.has-error').hide(); | ||
}); | ||
}); | ||
var bindEventListeners = function () { | ||
$('input[name="text"]').on('keypress', function () { | ||
$('.has-error').hide(); | ||
}); | ||
|
||
$('input[name="text"]').on('click', function() { | ||
$('.has-error').hide(); | ||
}); | ||
}; | ||
|
||
$(document).ready(function () { | ||
$('input').on('click', function() { | ||
$('.has-error').hide(); | ||
$.extend(window, true, { | ||
'Superlists': { | ||
'Lists': { | ||
'bindEventListeners': bindEventListeners | ||
} | ||
} | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters