Snippet:
const imageUrl = 'img/star.png';
$("#venueId-"+nodeId).css('background','url("'+imageUrl+'") no-repeat top right');
This piece of code is the start of a function that triggers upon clicking. The goal is to display the image (img/star.png
) in the top-right corner of the div. However, when this script runs, nothing seems to happen.
I've verified the relative path of the image, and I encountered no issues with this code when changing the background to a gradient instead.