Setting the attribute of an HTML tag with EJS or jQuery
You have to include string values within quotes.
In html:
<img id="my_img" src="<%= person.picture %>" alt="">
In jQuery:
$("#my_img").attr("src", "<%= person.picture %>");
You have to include string values within quotes.
In html:
<img id="my_img" src="<%= person.picture %>" alt="">
In jQuery:
$("#my_img").attr("src", "<%= person.picture %>");