Skip to content

Instantly share code, notes, and snippets.

@dacur
Created February 3, 2015 15:14
Show Gist options
  • Select an option

  • Save dacur/226edd055e37cb7c6c0e to your computer and use it in GitHub Desktop.

Select an option

Save dacur/226edd055e37cb7c6c0e to your computer and use it in GitHub Desktop.
Loop through a set of checkboxes. If checked, push into an array.
var inputID = "";
$('#howDidIFeelCheckboxes').find('input').each(function(){
if($(this).is(':checked')){
inputID = $(this).attr('id');
// alert(id);
_howDidIFeelPopup.push(inputID);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment