So just started learning jQuery. I can't seem to make it work. So I already linked my jQuery to my html document with the script tag:
<script type="text/javascript" src="script.js"></script>
I have a h1
titled ONE
TWO
THREE
. Each word is attributed differently using <span>
tags. What I want to try out is put a slidedown fucntion on the word ONE
. So what am I missing here or doing wrong here? Is the fact that my h1
is position:fixed
have to do something with this?
html:
<html>
<head>
<title></title>
<link rel='stylesheet'rel="stylesheet" href='style.css'/>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1><span id="ONE">ONE</span><br><span id="TWO">TWO</span><br><span id="THREE"> THREE</span><br></h1>
</body>
</html>
css for h1:
h1 {position:fixed;
left:14px;
bottom:36px;
margin-bottom:15px;
line-height:40px;
}
css code for ONE
:
#ONE {
font-family:broadway;
font-size:80px;
color:#880303;
}
jQuery function for ONE
:
$(document).ready(function() {
$('#ONE').slideDown('slow');
});