Click and Pull not working although code seems ok (to me)


#1


https://www.codecademy.com/en/courses/web-beginner-en-GfjC6/2/2?curriculum_id=50a3fad8c7a770b5fd0007a1#


Why doesn't his work? I get: "Oops, try again. Did you put '.pull-me' inside a $() to make it a jQuery object?"


$(document).ready(function(){
    $('.pullme').click();
});


#2

.This works:

$(document).ready(function($('.pullme').click();){
    
});

but the instructions say: "Your function won't take any inputs between ()s, but between its {}s, it should call the .click() event handler on the .pull-me jQuery object."

Isn't this different to the instructions? Anyway, onwards!


#3

Did you put '.pull-me' inside a $() to make it a jQuery object?

$('.pullme').click();


#4

in case this hasn't been resolved already, your code is 100% right, you're just missing the - from in between .pull-me


#5

Ha, that was it. Thanks a bunch!


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.