Flexible Selections


#1

Hi! Anyone know how to do this assignment correctly?
$(document).ready(function() {
$('div,pink,red').fadeTo('slow',0);
});


#2

Hi Beichen,

The div part isn't necessary. After that, since pink and red are classes, you need to put a dot (.) before each of them like this:

.pink, .red

...since right now your code is trying to select these elements:

<div>
<pink>
<red>

I hope this helps! :slightly_smiling:


#3

$(document).ready(function() {
$('.red, .pink').fadeOut('slow', 0);
});

My code works in the window, but I get "Oops, try again. Did you call fadeTo('slow',0) on the .pink divs?"

Any suggestions


#4

You need to use fadeTo rather than fadeOut