I think there may be something wrong with the semi-colon at the end of your script, or an invisible weirdo character that comes after it (perhaps if you copy/pasted it from somewhere). Your code didn't work for me either, but when I delete that whole line and then type it again manually, it works fine.
now that you mention it, anytime I copy and paste from jsfiddle it doesn't work If you check your page which chrome it's stating there's an illegal character
http://jsfiddle.net/2ee2r/
But not on the following test page viewed in Safari and Chrome (haven't tested it in other browsers):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style>
div { background-color: #000; display: none; position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px; }
</style>
<script src="http://code.jquery.com/jquery-latest.js">
</script>
<title>Title</title>
</head>
<body>
<div>
</div>
<script>
$(document).ready(function() {
$('div:hidden').fadeIn(1000)
});
</script>
</body>
</html>
Any idea what I've done wrong?
Thanks in advance for any help.
Also if you're going to leave the div empty i'd suggest using
Also, I suppose you meant that I should use:
<p> </p>
in the otherwise empty div?
and you could leave out the paragraph
http://mindmadebooks.com/new_test.html
and got the same results.
Thanks for your help.
If you check your page which chrome it's stating there's an illegal character
And thanks, karlpcrowley -- I should have verified the code.
I appreciate the speedy replies!