From d279019b7198193482a5db104bfc834a3b811e49 Mon Sep 17 00:00:00 2001 From: campbell-m <87438215+campbell-m@users.noreply.github.com> Date: Wed, 29 May 2024 16:45:52 +0100 Subject: [PATCH] Eliminate duplicated jQuery selector (not really duplicated, but it keeps the IDE happy). --- web/js/refresh.js.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/js/refresh.js.php b/web/js/refresh.js.php index 4951892202..9ad91cc15c 100644 --- a/web/js/refresh.js.php +++ b/web/js/refresh.js.php @@ -174,11 +174,13 @@ function(result){ ?> getFirstNonZeroSlotSize: function() { var slotSize; + var table = $('#day_main'); + - $('#day_main').find('thead th').not('.first_last').each(function () { + table.find('thead th').not('.first_last').each(function () { slotSize = $(this).outerWidth(); if (slotSize) { @@ -190,7 +192,7 @@ function(result){ else { ?> - $('#day_main').find('tbody tr').each(function () { + table.find('tbody tr').each(function () { slotSize = $(this).outerHeight(); if (slotSize) {