ISSUE :
 
Profile photo
Submitted by Collin Shaw
on February 4th, 2013 at 23:19:19 EST

jquery css background changer

=================================================================================
html and jquery
=================================================================================

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
<title>CMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="index,follow" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js";></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.min.js";></script>
<script>
$(document).ready(function(){
$("#button").click(function(){
$("body").css("background-image","url('../images/main_bg_landscape_2.jpg')");
});
});
</script>
</head>
<body>
<div id="button">
</div>
</body>
</html>

============================================================================
CSS
============================================================================


body {
background-image:url('../images/main_bg_landscape.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center top;
background-size: 100% 100%; /*This bit will make the image fit the whole page*/

}

#button {
background-image:url('../images/light-switch-on.jpg');
width: 18px;
height: 24px;
}

================================================================================
================================================================================


Profile photo
Replied by SBajra
on March 28th, 2013 at 08:36:49 EST
Is this a question or a solution. This is question and solution website. Please be more elaborative when you post your issue.