জয়েন লগইন

জেকুয়েরী last-child

🌈জেকুয়েরী last-child কি?

📋জেকুয়েরী last-child হলো প্যারেন্টের শেষ চাইল্ড এলিমেন্ট সিলেক্ট করার পদ্ধতি।

⚒️জেকুয়েরী last-child প্যারেন্টের শেষ চাইল্ড এলিমেন্ট সিলেক্ট করতে ব্যবহৃত হয়।

জেকুয়েরী last-child প্যারেন্টের শেষ চাইল্ড এলিমেন্ট সিলেক্ট করার উদাহরণ।

jquery
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("li:last-child").css("color", "red");
  });
});
</script>
</head>
<body>
<button>ক্লিক করুন</button>
<ul>
  <li>পিএইচপি</li>
  <li>জাভা</li>
  <li>পাইথন</li>
  <li>জাভাস্ক্রিপ্ট</li>
</ul>
</body>
</html>