Skip to content

Commit 44dbbbd

Browse files
committed
Merge pull request #678 from nailgun/master
Fix jQuery events priority
2 parents 9d49009 + cbbc000 commit 44dbbbd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
init: function() {
99
$('#djDebug').show();
1010
var current = null;
11-
$(document).on('click', '#djDebugPanelList li a', function() {
11+
$('#djDebugPanelList').on('click', 'li a', function() {
1212
if (!this.className) {
1313
return false;
1414
}
@@ -44,20 +44,20 @@
4444
}
4545
return false;
4646
});
47-
$(document).on('click', '#djDebug a.djDebugClose', function() {
47+
$('#djDebug').on('click', 'a.djDebugClose', function() {
4848
$(document).trigger('close.djDebug');
4949
$('#djDebugToolbar li').removeClass('djdt-active');
5050
return false;
5151
});
52-
$(document).on('click', '#djDebug .djDebugPanelButton input[type=checkbox]', function() {
52+
$('#djDebug').on('click', '.djDebugPanelButton input[type=checkbox]', function() {
5353
djdt.cookie.set($(this).attr('data-cookie'), $(this).prop('checked') ? 'on' : 'off', {
5454
path: '/',
5555
expires: 10
5656
});
5757
});
5858

5959
// Used by the SQL and template panels
60-
$(document).on('click', '#djDebug .remoteCall', function() {
60+
$('#djDebug').on('click', '.remoteCall', function() {
6161
var self = $(this);
6262
var name = self[0].tagName.toLowerCase();
6363
var ajax_data = {};
@@ -83,7 +83,7 @@
8383
$('#djDebugWindow').html(message).show();
8484
});
8585

86-
$(document).on('click', '#djDebugWindow a.djDebugBack', function() {
86+
$('#djDebugWindow').on('click', 'a.djDebugBack', function() {
8787
$(this).parent().parent().hide();
8888
return false;
8989
});
@@ -92,7 +92,7 @@
9292
});
9393

9494
// Used by the cache, profiling and SQL panels
95-
$(document).on('click', '#djDebug a.djToggleSwitch', function(e) {
95+
$('#djDebug').on('click', 'a.djToggleSwitch', function(e) {
9696
e.preventDefault();
9797
var btn = $(this);
9898
var id = btn.attr('data-toggle-id');

0 commit comments

Comments
 (0)