Problem with JQuery Effects lesson 4 - bounce


#1



This is the code that I have write in lesson 4 - JQuery Effects bounce. The Krypton planet is bouncing 3 time for 500 milliseconds, but the code is not accepted. See my code below. What is wrong? Thank you.


$(document).ready(function()
{
    $("div").click(function()
    {
        $(this).effect('bounce', {time:3},500);
    });
});


#2

@infoalexanderlilov.c,

Change your jQuery Selector
$("div")
into
$('div')' in which you use single-quotes.....


#3

Leonard,
Thank you for your advice,but JavaScript (JQuery) as many other languages and scripts accept both single as double quotes.
I have tried your suggestion, but single or double doesn’t help.
I get the same error: "Oops, try again. Did you set your .effect() to bounce 3 times?"


#4

add "s"

{times:3} not{time:3}

@infoalexanderlilov.c


#5

@infoalexanderlilov.c

JavaScript (JQuery) as many other languages and scripts accept both single as double quotes

You're correct there, but this course doesn't always allow for both types of quotes when checking the code, so it's a common thing that holds users back :slight_smile: