Currently, I am attempting to modify the background image of a div element.
The issue lies in the fact that I have saved the image in a variable and am unsure how to use it as it is not a direct file path.
var bgImage = $('#box').find('img');
$('#box2').css('background-image', url(bgImage));
Can anyone identify where I may be making an error?