From f475f5423c7d0e1f1bf7ba7d95753812dbcb7ca4 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 17 Apr 2016 12:59:12 +0200 Subject: [PATCH] Add active class when clicking --- public/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/index.html b/public/index.html index 99ad836..f797fcc 100644 --- a/public/index.html +++ b/public/index.html @@ -207,6 +207,8 @@ $(document).on('click', '.pl_item', function (e) { e.preventDefault(); var pl_name = $(this).text(); + $('.pl_item').removeClass('active'); + $(this).addClass('active'); var target = document.getElementById('spin-dups'); var spinner = new Spinner(spinnerOpts).spin(target); $.ajax({