Topic: jQuery newbie trying to understand

I'm a definite Rails newbie having just completed the Ruby on Rails 3 Tutorial.Now there was some small section on Ajax and Rails and the code in the tutorial didn't work. I finally got it to work but I'd like to understand a few things. By the way I'm using the latest version of Ruby, Rails and jQuery.Tutorial code in a 'create.js.erb' file:$(