I am trying to select an input where the value equals a dynamic value
trimmed = jQuery.trim(a); preSelectedCheckBox = $(this).find(\"input[value=\" + trimmed
Are you just missing the enclosing single quotes?
trimmed = jQuery.trim(a); preSelectedCheckBox = $(this).find("input[value='" + trimmed + "']");