Exploring ways to dynamically resize the background image of my website based on the current window dimensions using jQuery.
At the moment, I have tried the following approach:
$(window).resize(function()
{
$("body").css({"background-size" : "100% 100%"});
});
However, this method results in the background not being displayed at all. If I remove one of the '100%', it only stretches to the width but not the height. I'm unsure about what might be missing in my implementation.