Skip to content
Justice Tech School

Chaining

Most methods return the jQuery object so calls can chain.

Example
$("#box")
  .addClass("on")
  .css("color", "red")
  .fadeIn(200)
  .text("Done");

Exercise

Chain calls.

$("#b").a()b()

Quiz Test

What makes chaining possible?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.