Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Created September 18, 2014 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jimrubenstein/29941139fb00e98d6f69 to your computer and use it in GitHub Desktop.
Save jimrubenstein/29941139fb00e98d6f69 to your computer and use it in GitHub Desktop.
function createOption($listItem, $input)
{
$listItem.on('click tap', function(evt)
{
$input.prop('checked', ! $input.prop('checked'));
if ($input.is(':checked'))
{
$listItem.addClass('selected');
}
else
{
$listItem.removeClass('selected');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment