Jquery function and selector lesson 6 bugs


#1

Hi,

I'm totally sure that my code is right but I keep getting this error message: there's an error ($e(...).a.cacher is not a function). Here my answer
$(document).ready(function() {
$('button').click(function() {
$('.vanish').fadeOut('slow');
});
});
Can anyone help me with this! I can't complete the course and that's frustrating.

Thanks a million


#2

@lramapathiran,
You have to remember that if you use the jQuery-Selector $(...)
to select

  • a HTML-Element carrying a class Attribute you prepend the class-name with a dot like
    $('.status-box')
  • a HTML-Element carrying a id Attribute you prepend the id-name with a # like
    $('#an-id-name')
  • a HTML-Element by its HTML-Tag-name like
    $('body') or $('p')
    You can train yourself by playing around
    http://www.w3schools.com/jquery/trysel.asp

==================================================


#3

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