الفرق بين المراجعتين ل"jQuery/event/isPropagationStopped"

من موسوعة حسوب
اذهب إلى التنقل اذهب إلى البحث
(أنشأ الصفحة ب'<noinclude>{{DISPLAYTITLE:الحدث <code>‎event.isPropagationStopped</code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ في jQuery}}</noinclude> == <code>...')
 
ط
سطر 1: سطر 1:
<noinclude>{{DISPLAYTITLE:الحدث <code>‎event.isPropagationStopped</code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ في jQuery}}</noinclude>
+
<noinclude>{{DISPLAYTITLE:التابع <code>‎event.isPropagationStopped</code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ في jQuery}}</noinclude>
 
== <code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎event.isPropagationStopped()‎</code> ==
 
== <code>‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎event.isPropagationStopped()‎</code> ==
  
سطر 6: سطر 6:
  
 
=== الوصف ===
 
=== الوصف ===
يتحقق هذا الحدث من استدعاء الحدث <code>[[jQuery/event/stopPropagation|event.stopPropagation()]]</code>‎‎ على كائن الحدث هذا.
+
يتحقق هذا التابع من استدعاء الحدث <code>[[jQuery/event/stopPropagation|event.stopPropagation()]]</code>‎‎ على كائن الحدث هذا.
  
 
=== <code>event.isPropagationStopped()‎</code> ===
 
=== <code>event.isPropagationStopped()‎</code> ===
سطر 13: سطر 13:
 
لا يقبل هذا التابع أي وسائط.
 
لا يقبل هذا التابع أي وسائط.
  
تابع الحدث هذ موصوف في [https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/events.html#Events-Event-isPropagationStopped مواصفات W3C DOM Level 3] .
+
تابع الحدث هذا موصوف في [https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/events.html#Events-Event-isPropagationStopped مواصفات W3C DOM Level 3] .
  
 
=== أمثلة ===
 
=== أمثلة ===

مراجعة 14:34، 29 مايو 2018

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎event.isPropagationStopped()‎

القيمة المعادة

يُعيد كائنًا من النوع Boolean.

الوصف

يتحقق هذا التابع من استدعاء الحدث event.stopPropagation()‎‎ على كائن الحدث هذا.

event.isPropagationStopped()‎

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

لا يقبل هذا التابع أي وسائط.

تابع الحدث هذا موصوف في مواصفات W3C DOM Level 3 .

أمثلة

التحقق من استدعاء event.stopPropagation()‎‎.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>event.isPropagationStopped demo</title>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 
<button>click me</button>
<div id="stop-log"></div>
 
<script>
function propStopped( event ) {
  var msg = "";
  if ( event.isPropagationStopped() ) {
    msg = "called";
  } else {
    msg = "not called";
  }
  $( "#stop-log" ).append( "<div>" + msg + "</div>" );
}
 
$( "button" ).click(function(event) {
  propStopped( event );
  event.stopPropagation();
  propStopped( event );
});
</script>
 
</body>
</html>

مصادر