Skip to content

Commit 84d6b5d

Browse files
committed
Added small example of attaching event listeners
This closes select2#4255
1 parent 962fd63 commit 84d6b5d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/_includes/options/events/jquery.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ <h3>
5050
How can I attach listeners for these events?
5151
</h3>
5252

53+
{% highlight js linenos %}
54+
$('select').on('select2:select', function (evt) {
55+
// Do something
56+
});
57+
{% endhighlight %}
58+
5359
{% include options/not-written.html %}
5460

5561
<h3>

0 commit comments

Comments
 (0)