I add a default.aspx & .js file & Image Folder('contain a lot of image files') in web site.
My .aspx file code is below:-
----------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<!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" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server" onload="LoadDataToText">
<asp:Button ID="Button1" runat="server" Text="Press Me" OnClick="rotate" />
<br />
<script language="javascript" type="text/javascript" src="JS/ImgRotate.js" >
</script>
<img src="Image/Flower.jpg" width="400" height="400" id="adBanner" alt="AdBanner"/>
</form>
</body>
</html>
My .js file code is below:-
-------------------------
window.onload = rotate;
var thisAd = 0;
var adImages = new Array("Image/ani0a.jpg", "Image/ani10a.jpg", "Image/ani11a.jpg");
function rotate()
{
thisAd++;
if (thisAd == adImages.length)
{
thisAd = 0;
}
document.getElementById("adBanner").src = adImages[thisAd];
setTimeout("rotate()", 3 * 1000);
}
Above code is work fine. Image are rotate one after one at interval 3sec.
But when i will locate the mouse on the image in that i will do stop the rotation & reversely, i will again start the rotation process.
How will i do that problem in onmouseover/onmouseout events using javascript.
But not a jquery.
Please Please help me anybody.....