diff options
| author | Callum Macrae <callum@lynxphp.com> | 2011-10-22 16:31:52 +0100 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:09:19 +0200 |
| commit | 95659ba92c01a3cf4c654568e9a59ba554558a7e (patch) | |
| tree | 187c6bc28adf60ac42f9c246bde2c06a0a6c72e1 /phpBB/styles/prosilver/template | |
| parent | 1c5b1ede1c35d57e9abfb62bdee145828011b1b0 (diff) | |
| download | forums-95659ba92c01a3cf4c654568e9a59ba554558a7e.tar forums-95659ba92c01a3cf4c654568e9a59ba554558a7e.tar.gz forums-95659ba92c01a3cf4c654568e9a59ba554558a7e.tar.bz2 forums-95659ba92c01a3cf4c654568e9a59ba554558a7e.tar.xz forums-95659ba92c01a3cf4c654568e9a59ba554558a7e.zip | |
[ticket/10271] Reduced calls to $ in the AJAX JavaScript.
PHPBB3-10271
Diffstat (limited to 'phpBB/styles/prosilver/template')
| -rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 66b34f7726..4fd4cd32f5 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -35,16 +35,18 @@ phpbb.add_ajax_callback('row_delete', function(el) { // This handles friend / foe additions removals. phpbb.add_ajax_callback('zebra', function(el, res) { if (res.success) { - $('.zebra').html(res.MESSAGE_TEXT); - $($('.zebra').get(1)).remove(); + var zebra = $('.zebra'); + zebra.html(res.MESSAGE_TEXT); + $(zebra.get(1)).remove(); } });; $('[data-ajax]').each(function() { - var fn = ($(this).data('ajax') !== 'true') ? $(this).data('ajax') : null; - phpbb.ajaxify({selector: this}, $(this).data('refresh') !== undefined, fn); + var $this = $(this); + var fn = ($this.data('ajax') !== 'true') ? $this.data('ajax') : null; + phpbb.ajaxify({selector: this}, $this.data('refresh') !== undefined, fn); }); |
