Q:

Set background-image using jQuery CSS property

0

Set background-image using jQuery CSS property.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

HTML Code :

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Set background-image using jQuery CSS property.</title>
</head>
<body>
</body>
</html>

JavaScript Code:

$('body').css('background-image',
 'url("https://www.w3resource.com/includes/jquery-images/jquery.gif")');

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now