Restrict the max li selected in external JS file | Sololearn: Learn to code for FREE!

+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()); });

2/22/2020 5:31:36 PM

SWL

1 Answer

New Answer

+1

Did your find a solution? Im just a js noob