Przeglądaj źródła

Added section for events

Both public jQuery events and internal Select2 events will be
documented.
Kevin Brown 9 lat temu
rodzic
commit
a96ec9d91c

+ 2 - 2
docs/_includes/nav/options-new.html

@@ -1,7 +1,7 @@
 <nav class="s2-docs-sidebar hidden-print hidden-xs hidden-sm">
   <ul class="nav s2-docs-sidenav">
     <li>
-      <a href="#core-options">Core Options</a>
+      <a href="#core-options">Core options</a>
       <ul class="nav">
         <li><a href="#data-attributes">Declaring configuration in the <code>data-*</code> attributes</a></li>
         <li><a href="#amd">AMD compatibility</a></li>
@@ -51,7 +51,7 @@
     <li>
       <a href="#events">Events</a>
       <ul class="nav">
-        <li><a href="#events-public">Public events</a></li>
+        <li><a href="#events-public">Public jQuery events</a></li>
         <li><a href="#events-internal">Internal events</a></li>
       </ul>
     </li>

+ 8 - 0
docs/_includes/options-new/core/options.html

@@ -6,4 +6,12 @@
   <h3>
     Can default options be set for all dropdowns?
   </h3>
+
+  <h3>
+    How can I set a default value for a nested option?
+  </h3>
+
+  <h3>
+    How can I reset all of the global default options?
+  </h3>
 </section>

+ 8 - 0
docs/_includes/options-new/events.html

@@ -0,0 +1,8 @@
+<section>
+  <h1>
+    Events
+  </h1>
+  
+  {% include options-new/events/jquery.html %}
+  {% include options-new/events/internal.html %}
+</section>

+ 9 - 0
docs/_includes/options-new/events/internal.html

@@ -0,0 +1,9 @@
+<section>
+  <h2 id="events-internal">
+    Internal Select2 events
+  </h2>
+  
+  <p>
+    Select2 has an internal event system that works independently of the DOM event system. This internal event system is only accesssible from plugins and adapters that are connected to Select2.
+  </p>
+</section>

+ 17 - 0
docs/_includes/options-new/events/jquery.html

@@ -0,0 +1,17 @@
+<section>
+  <h2 id="events-public">
+    Public jQuery events
+  </h2>
+
+  <h3>
+    What events will Select2 trigger?
+  </h3>
+
+  <h3>
+    How can I attach listeners for these events?
+  </h3>
+
+  <h3>
+    What events does Select2 listen for?
+  </h3>
+</section>

+ 1 - 0
docs/options-new.html

@@ -22,6 +22,7 @@ slug: options
       {% include options-new/core.html %}
       {% include options-new/data.html %}
       {% include options-new/selections.html %}
+      {% include options-new/events.html %}
     </div>
     <div class="col-md-3" role="complementary">
       {% include nav/options-new.html %}