This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
about 10 years

7/14 - car

$(document).ready(function() {
    $("#car").click(function() {
    $("#car").draggable();
    
});
});

the instructions say to use #car , in the CSS there is no #CAR. also this code is letting me pass. yet i cant click and drag the car. what have i done wrong?

Answer 532c36b9631fe9b75f0000dd

9 votes

Permalink

$(document).ready(function() {
    $('#car').draggable();
});

I think that’s all you need.

points
Submitted by infuntile
about 10 years

Answer 533bd882548c35f842001d52

3 votes

Permalink

The #car refers to the div id in your html document not your CSS.

points
Submitted by Ted Forster
about 10 years

Answer 5406edfe80ff33a8f50012bc

0 votes

Permalink

this correct code :

$(document).ready(function () { $(‘#car’).draggable(); });

points
Submitted by Bharath Reddy
over 9 years

Answer 553e2a04937676d1ff0001e2

0 votes

Permalink

the correct code (double quotes needed):

$(document).ready(function() { $(“#car”).draggable(); });

points
Submitted by wrmaniatis
almost 9 years