Select by class. BUG?


#1

$(document).ready(function() {
    $('button').click(function() {
     $('.vanish').fadeOut('slow');   
    });
});

Hello, i don’t understand why it’s not working, i keep having the message:Please follow the instructions on the Full Preview page to test your code.
can someone help me??
i tried refreshing, closing the browser, changing browser, log out from codeacademy and log in again… same error!


#2

when submitting the code, does the preview window go full screen? You should click the button to make the element vanish, wait two seconds, then make the preview window small again, you should be able to progress


#3

yes when i submit the code, the window go fullscreen, i click the button to make the element vanish, but after its not possible to progress, i got the error…


#4

but the divs aren’t fading, so that is a big hint? The function you need to make the elements fade is fadeOut, you use fadeout


#5

i changed it with fadeOut, the divs are fading but i keep having an error: $e(…).a.cacher is not a function


#6

Can i see an updated version of your code? Maybe now is a good time to refresh the page


#7
$(document).ready(function() {
    $('button').click(function() {
     $('.vanish').fadeOut('slow');   
    });
});

#8

works fine now, try refreshing page/different browser


#9

tried to refresh, and changed the browser, still not working:
error: $e(’.disparaitre’).a.cacher is not a function. (In ‘$e(’.disparaitre’).a.cacher’, ‘$e(’.disparaitre’).a.cacher’ is undefined)


#10

okay, post:

full html
full css code
full jquery code
exercise url


#11

CSS:

.vanish {
height: 100px;
width: 100px;
display: inline-block;
background-color: #F38630;
border-radius: 5px;
}

JQuery code:

$(document).ready(function() {
    $('button').click(function() {
     $('.vanish').fadeOut('slow');   
    });
});

https://www.codecademy.com/fr/courses/web-beginner-fr-FR-w5vxj/1/2?curriculum_id=5355c479516bcbd91200000d


#12

its the french one, that explains a lot. Just write something invalid, it will crash the validition and let you pass, your code is fine, the exercise is bugged

anything invalid:

$(document).ready(function() {
    $('button').click(function() {
     $('.vanish').[fadeOut]('slow');   
    });
});

will do


#13

Thank you! like you said the exercise is bugged, i tried what you wrote: SUCCESS!
thank you +1000000! for your help!!!

:slight_smile:


#14