Tsallaka zuwa abun ciki
Justice Tech School

Project: Tabs

Switch visible panels with classes.

Example
$(".tabs a").on("click", function (e) {
  e.preventDefault();
  $(".tabs a").removeClass("on");
  $(this).addClass("on");
  $(".panel").hide();
  $($(this).attr("href")).show();
});

Exercise

Show target.

$(href).()

Quiz Test

What does attr("href") give?

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