Set background-image using jQuery CSS property.
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")');
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
HTML Code :
JavaScript Code: