This seems like it should be simple, so not sure what i'm missing
// this works
$("#Q270_1, #Q271_1").change(function () {
alert("Check 1")
});
// this works
var m1c1 = "#Q270";
$(m1c1+"_1").change(function () {
alert("Check 2")
});
// This doesn't work
var m1c2 = "#Q271";
$(m1c1+"_1",m1c2+"_1").change(function () {
alert("Check 3")
});
Here is a jsfiddle where it shows the above: https://jsfiddle.net/9Led5cv9/
Any assistance much appreciated. Thanks!
,within the quotes, as it's part of the selector string. Additionally, you need to concatenate the m1c2 with a+.$(m1c1+"_1,"+m1c2+"_1")