الفرق بين المراجعتين ل"jQuery/descendant selector"

من موسوعة حسوب
اذهب إلى التنقل اذهب إلى البحث
ط
ط
سطر 1: سطر 1:
<noinclude>{{DISPLAYTITLE:التابع <code>Descendant Selector (“ancestor descendant”)‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎</code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ في jQuery}}</noinclude>
+
‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎محدد العناصر السليلة ‎“ancestor descendant”‎ 
== ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎Descendant Selector (“ancestor descendant”)‎ ==
+
 
 +
<noinclude>{{DISPLAYTITLE:‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎محدد العناصر السليلة <code>“ancestor descendant”‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎</code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ في jQuery}}</noinclude>
 +
== ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎محدد العناصر السليلة ‎“ancestor descendant”‎  ==
  
 
=== الوصف ===
 
=== الوصف ===
سطر 12: سطر 14:
  
 
==== <code>Descendant</code> ====
 
==== <code>Descendant</code> ====
محدد لتصفية العناصر التابعة.
+
محدد لتصفية العناصر السليلة.
  
يمكن أن يكون الـ descendant لعنصرٍ ما هو إبن هذا العنصر، أو حفيده، أو ابن الحفيد، وهكذا.
+
يمكن أن يكون سليل عنصرٍ ما هو إبن هذا العنصر، أو حفيده، أو ابن الحفيد، وهكذا.
  
 
=== أمثلة ===
 
=== أمثلة ===
وضع علامة على كافة المدخلات التي هي جزءٌ نموذج له حدود زرقاء منقط. وإعطاء خلفية صفراء لإدخالات الـ descendants الخاصة بمجموعة حقول descendant من النموذج.<syntaxhighlight lang="html">
+
وضع علامة على كافة المدخلات السليلة من نموذج له حدود زرقاء مُنقطة. وإعطاء خلفية صفراء لإدخالات الـعناصر السليلة الخاصة بمجموعة حقول سليلة من النموذج.<syntaxhighlight lang="html">
 
<!doctype html>
 
<!doctype html>
 
<html lang="en">
 
<html lang="en">
سطر 68: سطر 70:
 
[[تصنيف:jQuery]]
 
[[تصنيف:jQuery]]
 
[[تصنيف:jQuery Method]]
 
[[تصنيف:jQuery Method]]
[[[[تصنيف:jQuery Selectors]]
+
[[
[[[[تصنيف:jQuery Hierarchy]]
+
[[تصنيف:jQuery Selectors]]
 +
[[
 +
[[تصنيف:jQuery Hierarchy]]

مراجعة 13:37، 11 مايو 2018

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎محدد العناصر السليلة ‎“ancestor descendant”‎ 


‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎محدد العناصر السليلة ‎“ancestor descendant”‎ 

الوصف

يختار جميع العناصر التي تنتمي إلى سلف معين.

jQuery( "ancestor descendant" )‎

أُضيف مع الإصدار: 1.0.

ancestor

أي مُحدِد صالح.

Descendant

محدد لتصفية العناصر السليلة.

يمكن أن يكون سليل عنصرٍ ما هو إبن هذا العنصر، أو حفيده، أو ابن الحفيد، وهكذا.

أمثلة

وضع علامة على كافة المدخلات السليلة من نموذج له حدود زرقاء مُنقطة. وإعطاء خلفية صفراء لإدخالات الـعناصر السليلة الخاصة بمجموعة حقول سليلة من النموذج.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>descendant demo</title>
  <style>
  form {
    border: 2px green solid;
    padding: 2px;
    margin: 0;
    background: #efe;
  }
  div {
    color: red;
  }
  fieldset {
    margin: 1px;
    padding: 3px;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 
<form>
  <div>Form is surrounded by the green border.</div>
 
  <label for="name">Child of form:</label>
  <input name="name" id="name">
 
  <fieldset>
    <label for="newsletter">Grandchild of form, child of fieldset:</label>
    <input name="newsletter" id="newsletter">
  </fieldset>
</form>
Sibling to form: <input name="none">
 
<script>
$( "form input" ).css( "border", "2px dotted blue" );
$( "form fieldset input" ).css( "backgroundColor", "yellow" );
</script>
 
</body>
</html>

مصادر

صفحة التابع ‎Descendant Selector (“ancestor descendant”)‎‎ في توثيق jQuery الرسمي. [[ [[