0

how to set limit for select tag in jQuery

Max 10

29th May 2019, 1:14 PM
shu
shu - avatar
2 Respostas
+ 3
shu Hi shu , You can do this by adding this lines of Jquery $("select").on('change', function(t) { if (Object.keys($(this).val()).length <10) { $('option[value="' + $(this).val().toString().split(',')[10] + '"]').prop('selected', false); } }); If you need any more help ping me Have this till that 🍎 🍎 🍎 🍎 🍎
29th May 2019, 1:43 PM
DishaAhuja
DishaAhuja - avatar
0
Thanks Disha
29th May 2019, 5:37 PM
shu
shu - avatar