"It looks like you didn't set your div's opacity to 1" error on 2/3


Hi I'm getting the same error.
Here's my code:

$(document).ready(function() {
    $('div').mouseenter(function() {
        $('div').fadeTo('fast', 1);

And here's the link to the page:


Why does it tell me I'm not setting the div's opacity to 1?

@spookywalrus Your code passes for me. Does refreshing the page let you pass?


No, refreshing does not let me pass. Nor does the test page show the results


@spookywalrus Can I see your HTML code, please?

See how to make it visible here:


Sure. Here's the html. I've cut and pasted straight from the tutorial.

<title>Button Magic</title>
<link rel='stylesheet' type='text/css' href='stylesheet.css'/>
<script> type="text/javascript" src="script.js"</script>
<div><br/><strong>Click Me!</strong></div>


@spookywalrus Here's your problem:

<script> type="text/javascript" src="script.js"</script>

type="..." and src="..." are attributes which go on your opening <script> tag, so that line needs to be changed to look like this instead:

<script type="text/javascript" src="script.js"></script>



That worked!

Thank you so much.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.