Replace .click() with .on( 'click' · ableplayer/ableplayer@e55c22c · GitHub
Skip to content

Commit e55c22c

Browse files
committed
Replace .click() with .on( 'click'
See #612
1 parent af166de commit e55c22c

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎scripts/buildplayer.js‎

Lines changed: 1 addition & 1 deletion

‎scripts/dialog.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
if (e.which === 32) {
2929
thisObj.hide();
3030
}
31-
}).click(function () {
31+
}).on( 'click', function () {
3232
thisObj.hide();
3333
});
3434

‎scripts/event.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@
934934

935935
// handle clicks on playlist items
936936
if (this.$playlist) {
937-
this.$playlist.click(function(e) {
937+
this.$playlist.on( 'click', function(e) {
938938
if (!thisObj.userClickedPlaylist) {
939939
// stopgap in case multiple clicks are fired on the same playlist item
940940
thisObj.userClickedPlaylist = true; // will be set to false after new src is loaded & canplaythrough is triggered
@@ -945,7 +945,7 @@
945945
}
946946

947947
// Also play/pause when clicking on the media.
948-
this.$media.click(function () {
948+
this.$media.on( 'click', function () {
949949
thisObj.handlePlay();
950950
});
951951

‎scripts/preference.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,11 @@
789789
$prefsDiv.append('<hr>');
790790
saveButton = $('<button class="modal-button">' + this.tt.save + '</button>');
791791
cancelButton = $('<button class="modal-button">' + this.tt.cancel + '</button>');
792-
saveButton.click(function () {
792+
saveButton.on( 'click', function () {
793793
dialog.hide();
794794
thisObj.savePrefsFromForm();
795795
});
796-
cancelButton.click(function () {
796+
cancelButton.on( 'click', function () {
797797
dialog.hide();
798798
thisObj.resetPrefsForm();
799799
});
@@ -823,7 +823,7 @@
823823

824824
// Add click handler for dialog close button
825825
// (button is added in dialog.js)
826-
$('div.able-prefs-form button.modalCloseButton').click(function() {
826+
$('div.able-prefs-form button.modalCloseButton').on( 'click', function() {
827827
thisObj.resetPrefsForm();
828828
})
829829
// Add handler for escape key

‎scripts/transcript.js‎

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)