13. Well done?


#1


Bit confused by this lesson - I've apparantly 'passed', but my code doesn't actually toggle anything (see below), have I got this wrong?

$(document).ready(function(){
    $('.pull-me').click(.slideToggle('slow'));
    
    })


#2

I think the syntax isn't correct, if you want the

.pull-me

class itself to slideUp and slideDown on clicking then below is an example

$(document).ready(function(){
    $('.pull-me').click(function() {
    $(this).slideToggle('slow');
   
});
    
    });

this keyword represents the current object you are iterating upon, which is the 'pull-me' class in this case...

hope it's clear to you...


#3

Thanks very much for the tip abhi, yeah that was a great help thanks! :slight_smile:


#4

welcome...always here to help :slight_smile:


#5

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