From 8c748505db0bca8c988cfc450420dbbef0d9eb91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Jun 2018 17:25:16 +0200 Subject: [PATCH] Use parent instead of parents --- htdocs/fourn/js/lib_dispatch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/js/lib_dispatch.js b/htdocs/fourn/js/lib_dispatch.js index c92a4a6688c..c2c570643f8 100644 --- a/htdocs/fourn/js/lib_dispatch.js +++ b/htdocs/fourn/js/lib_dispatch.js @@ -65,7 +65,7 @@ function addDispatchLine(index, type, mode) //remove cloned select2 with duplicate id. $("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component - $(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parents("span.selection").parents(".select2").detach(); + $(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach(); /* Suffix of lines are: _ trs.length _ index */ $("#qty_"+nbrTrs+"_"+index).focus();