So I want one of my images, when clicked on, to have the #app1
animate towards either side then fade out.
I'm aware that my image should have a "on click" attribute, which I have done so. I have a swipe function that will get called. Within my swipe function is where the javascript/jquery is suppose to do the animation.
Yet it is not working, am I doing something wrong? Please help.
THANKS.
<!DOCTYPE html>
<!-- this is comment -->
<html>
<head>
<title>Forget Me Not</title>
<style>
body
{
background-color:#66d9ff;
}
#app1{
position:absolute;
width:250px;
height:250px;
z-index:0;
top:50%;
left:50%;
margin:-150px 0 0 -150px;
background:white;
box-shadow: 0 0 1px 1px #888888;
text-align:center
}
img.appIMG1{
-webkit-box-shadow: 0 0 1px 1px #888888;
box-shadow:0 0 1px 1px #888888;
}
img.appIMG2{
-webkit-box-shadow: 0 0 1px 1px #888888;
box-shadow:0 0 1px 1px #888888;
}
</style>
<script src="jquery-1.9.1.js"></script>
<script>
function Swipe()
{
$(document).ready(function()
{
$(".appIMG1").click(function()
{
$("app1").animate({left:'250px'});
});
});
}
</script>
</head>
<body>
<div id="app1"><p><b><u><font face="TimeBurner" color="#66d9ff" size="6">Do you want to make a reminder?</b></u></font></p>
<br>
<img class="appIMG1" border="0" src="YES.png" align="left" hspace=1.8% onclick="Swipe()">
<img class="appIMG2" border="0" src="NO.png" align="right" hspace=2%>
</div>
</body>
</html>