Skip to content

Commit a96ec9d

Browse files
committed
Added section for events
Both public jQuery events and internal Select2 events will be documented.
1 parent 75abd40 commit a96ec9d

6 files changed

Lines changed: 45 additions & 2 deletions

File tree

docs/_includes/nav/options-new.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<nav class="s2-docs-sidebar hidden-print hidden-xs hidden-sm">
22
<ul class="nav s2-docs-sidenav">
33
<li>
4-
<a href="#core-options">Core Options</a>
4+
<a href="#core-options">Core options</a>
55
<ul class="nav">
66
<li><a href="#data-attributes">Declaring configuration in the <code>data-*</code> attributes</a></li>
77
<li><a href="#amd">AMD compatibility</a></li>
@@ -51,7 +51,7 @@
5151
<li>
5252
<a href="#events">Events</a>
5353
<ul class="nav">
54-
<li><a href="#events-public">Public events</a></li>
54+
<li><a href="#events-public">Public jQuery events</a></li>
5555
<li><a href="#events-internal">Internal events</a></li>
5656
</ul>
5757
</li>

docs/_includes/options-new/core/options.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ <h2 id="options">
66
<h3>
77
Can default options be set for all dropdowns?
88
</h3>
9+
10+
<h3>
11+
How can I set a default value for a nested option?
12+
</h3>
13+
14+
<h3>
15+
How can I reset all of the global default options?
16+
</h3>
917
</section>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<section>
2+
<h1>
3+
Events
4+
</h1>
5+
6+
{% include options-new/events/jquery.html %}
7+
{% include options-new/events/internal.html %}
8+
</section>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<section>
2+
<h2 id="events-internal">
3+
Internal Select2 events
4+
</h2>
5+
6+
<p>
7+
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.
8+
</p>
9+
</section>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<section>
2+
<h2 id="events-public">
3+
Public jQuery events
4+
</h2>
5+
6+
<h3>
7+
What events will Select2 trigger?
8+
</h3>
9+
10+
<h3>
11+
How can I attach listeners for these events?
12+
</h3>
13+
14+
<h3>
15+
What events does Select2 listen for?
16+
</h3>
17+
</section>

docs/options-new.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h1>
2222
{% include options-new/core.html %}
2323
{% include options-new/data.html %}
2424
{% include options-new/selections.html %}
25+
{% include options-new/events.html %}
2526
</div>
2627
<div class="col-md-3" role="complementary">
2728
{% include nav/options-new.html %}

0 commit comments

Comments
 (0)