+ 1

Restrict the max li selected in external JS file

I would like to restrict the li selected to be max 3 or max input to #moduleList is 3. How can I add it into the JavaScript below? $('#moduleDrop li').click(function(){ $(this).toggleClass('selected'); $('#moduleList').html($('#moduleDrop .selected').clone()); });

22nd Feb 2020, 5:31 PM
SWL
1 Odpowiedź
+ 1
Did your find a solution? Im just a js noob
6th Mar 2020, 11:00 PM
Jdubyou
Jdubyou - avatar