Instead of using :
$('input[id^="appName"]').each(function () {
}
});
I would like to use a varibale for Attribute Starts With Selector
var attrName = "appName";
$('input[id^=attrName]').each(function () {
}
});
The above syntax doesn't work. I checked the jQuery documentation and answers here without success.