jQuery problems


#1

Hello everyone,

I'm having some issues with the jQuery course. it started in the early steps where the course told me to do stuff that was
basically already done so I only had to click save and submit, which was kind of weird already. but now that I've come to step 11 the course keeps telling me I haven't set the opacity to 1 which I'm pretty sure I did. Is it possible that the jQuery course is having some issues or is it just me who got the code wrong.

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


#2

document shouldn't be in quotes


#3

Thanks for pointing that out!
The problem i described remains tho :frowning:.
still get the message that i havent set opacity to 1. also, when trying to hover over the button thingy it does nothing.
It just sits there not changing anything.


#4

You should use this as div is already specified


#5

I somehow solved it by copying something from another Q/A thread.

Original :

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

code i copied from the other post :

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

So it seems the solution was to add something that the course didn't really ask for(the mouseleave part) :confused: .
Might be an error with the course itself?.


#6

Oops I can't believe I didnt see you missed function that's why..


#9