From d2cc110678be9c42a8bf12168290108e648edc86 Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 29 Aug 2022 17:23:15 +0200 Subject: [PATCH] Use `this` instead of the CSS selector `.sortable` In this context, `this` already points to the element, so there is no need to search it again. --- app/assets/javascripts/sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/sortable.js b/app/assets/javascripts/sortable.js index 83a3d4721..ed085d5bd 100644 --- a/app/assets/javascripts/sortable.js +++ b/app/assets/javascripts/sortable.js @@ -9,7 +9,7 @@ attribute: "data-answer-id" }); $.ajax({ - url: $(".sortable").data("js-url"), + url: $(this).data("js-url"), data: { ordered_list: new_order },