I am trying to use JQuery to set a checkbox to checked if the input value of the checkbox is equal to some other variable that I have. This is what my code looks like:
var test_val = "test";
$('#checkbox[value='+test_val+']').attr('checked', true);
This does not seem to be working, thanks for the help