I can not realize switching the background of the page when pointing to a link. There is a menu and it is necessary that when you hover over its elements, the background of the page changes. Who faced this implementation?
<!DOCTYPE html> <html> <head> <style type="text/css"> body { font-size: 1em; text-shadow: 1px 1px 1px #000000, 0 0 7px #000000; color: #FFF; background: url( http://cred-fin.ru/_ph/1/2/724349401.jpg) 0 0 repeat; } .green-bg { background-image: url( http://img.pixasa.net/static/3/a/2/3a202aa5-0c13-4214-ab53-ddc39ef80cef.jpg); background-color: #060; } </style> <script type="text/javascript"> var _body = $('body'); $('span').on({ mouseenter: function(){ _body.toggleClass('green-bg'); }, mouseleave: function(){ _body.toggleClass('green-bg'); } }); </script> </head> <body> <span>Hover me</span> </body> </html>