Skip to content

Instantly share code, notes, and snippets.

@rnmp
Created June 1, 2011 12:35
Show Gist options
  • Save rnmp/1002206 to your computer and use it in GitHub Desktop.
Save rnmp/1002206 to your computer and use it in GitHub Desktop.
Perform an action when one or more checkboxes are checked
var runWhenClicked = function(){
var checked = $('#fave-restaurants').find(":checked");
checked.length > 0 ? $('#find-table-favorite').text('Buscar en los seleccionados') : $('#find-table-favorite').text('Buscar mesas'); }
$(':checkbox').click(runWhenClicked);
@rnmp
Copy link
Author

rnmp commented Jun 1, 2011

Special thanks to @onceuponapriori.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment