In a JavaScript callback function, I am displaying a Success/Failure message on my page. When I have the HTML content in one line as in the below code the message is added and everything works!
$('#message').html("<div class='alert alert-danger'><i class='fa fa-times-circle fa-2x'>Incorrect!</div>")
But when I try to format the HTML for better readability, as in the below - nothing happens and I don't see the message that I am trying to add nor any error messages in the Firebug console.
$('#message').html("<div class='alert alert-danger'>
<p><i class='fa fa-times-circle fa-2x'>
Incorrect! Yesterday was " + <%= @yesterday %> +
"</p>
<p>Click Next to continue.</p>
</div>")
I am not sure what the issue is, and any help is appreciated!