I have some code that receives a variable msg which I'd like to somehow pass to my modal. I'm using flask and tried to use jinja syntax but couldn't figure how, js string interpolation doesn't seem to work either. How can I pass the msg variable into ("#$Sub_Fail-HERE").modal("show")
$.ajax({
url: "{{url_for('mail_submit')}}",
type: "POST",
data: mail,
success: function(msg){
$("#Sub_Success").modal("show");},
error: function(msg){
$("#Sub_Fail-${msg}").modal("show");}
});