Tsallaka zuwa abun ciki
Justice Tech School

attr and prop

attr reads attributes and prop reads live properties.

Example
$("a").attr("href");
$("a").attr("target", "_blank");
$("input").prop("checked", true);
$("img").removeAttr("title");

Exercise

Set a property.

$("i").("checked", true)

Quiz Test

Which is best for checked state?

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