PDA

View Full Version : jquery fadeout issue



creative creator
06-01-2010, 07:28 AM
HI guys

i am new to jquery, i wrote some code like below but it's not working can anybody help in that, where is the worng

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>

<style type="text/css">
*{
margin-right:200px;
margin-top:50px;
}
#box{
width:200px;
padding:10px;
border:1px solid #333;
background:#333333;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFFFFF;
}
a{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#000;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
</style>
<script type="text/javascript">
$(function(){
$('a').click(function() {
$('#box').fadeOut('fast');
});
});
</script>
<div id="box">JQuery Fade-out Tutorial</div>
<a href="#">Click here</a>
</head>

<body>
</body>
</html>

azoomer
06-01-2010, 06:01 PM
I guess this part

<div id="box">JQuery Fade-out Tutorial</div>
<a href="#">Click here</a>
belongs between the <body> and </body> tags