App5: Change background image with mouseover effect


Whenever you took the cursor upon an image the image will be apply as the background image of the body. I have use 5 images with mouseover effect and those put into image folder.So if you don’t put your images on the image folder it will not found the currect path of the images, be carefull.


<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”&gt;
<html xmlns=””&gt;
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>


$(‘div img’).mouseover(function(){

var img_source = $(this).attr(‘src’);
var height = $(window).height();
var width = $(window).width();





<style type=”text/css”>
border:2px #0C3;
border:2px inset #999;

<div id=”main_div”>
<img src=”image/1.jpg” alt=”image 1″/>
<img src=”image/2.jpg” alt=”image 2″/>
<img src=”image/3.jpg” alt=”image 3″/>
<img src=”image/4.jpg” alt=”image 4″/>
<img src=”image/5.jpg” alt=”image 5″/>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s