Home > database >  jquery variable multi selectors
jquery variable multi selectors

Time:06-22

I would like to set a variable that store the length of all checked checkbox that has the class 'checkbox-guest' seems my code is not working

$('input[type="checkbox"]:checked', '.checkbox-guest').length;

CodePudding user response:

$('input[type="checkbox"]:checked, .checkbox-guest').length;

Try that? Let me know if that works!

CodePudding user response:

try

$("input:checkbox.checkbox-guest").length;
  • Related