summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-03-11 17:16:20 +0100
committershadlaws <shad@shadlaws.com>2013-03-11 17:16:20 +0100
commit2e94edab5396d53b1b09b6b1415d1f66d6f16de5 (patch)
tree0bd25769ecb9e0dd7003775b17fb55a0d11c6318 /lib/gallery.common.js
parent4d631a4cad515984fd202fbaa124b6a01f156379 (diff)
#2053 - Change all .bind() to .on() for jQuery future-proofing.
- on/off are preferred to bind/unbind, live/die, and delegate/undelegate in jQuery 1.7+ - they're likely on the road toward deprecation, so let's replace them now.
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 5ff6b397..f5dee958 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -212,7 +212,7 @@
}
// Attach event listeners to the input
- input.bind("focus", function(e) {
+ input.on("focus", function(e) {
// Empty input value if it equals it's label
if ($(this).val() == label.html()) {
$(this).val("");
@@ -220,7 +220,7 @@
button.attr("disabled", false);
});
- input.bind("blur", function(e){
+ input.on("blur", function(e) {
// Reset the input value if it's empty
if ($(this).val() == "") {
$(this).val(label.html());