إدارة الأحداث Development Tutorials, Guides & Insights
Unlock 1+ expert-curated إدارة الأحداث tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your إدارة الأحداث skills on DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
Tutorial
javascript
مكتبة jQuery: استخدام JavaScript بسهولة وفعالية
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>إضافة CSS باستخدام jQuery</title>
<style>
.highlight {
background-color: yellow;
}
</style>
</head>
<body>
<p id="paragraph">هذا نص بسيط.</p>
<button id="toggleHighlight">تبديل اللون</button>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$('#toggleHighlight').click(function() {
$('#paragraph').toggleClass('highlight');
});
</script>
</body>
</html>- عند النقر على الزر، سيتم إضافة أو حذف الفئة
highlightإلى الفقرة، مما يغير لون الخلفية.
Sep 26, 2024
Read More