We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 576f937 commit bae34d4Copy full SHA for bae34d4
1 file changed
docs/_includes/options/data/selection-access.html
@@ -35,6 +35,16 @@ <h2 id="selection-api-access">
35
36
// Retrieve custom attribute value of the first selected element
37
$('select').find(':selected').attr('data-custom-attribute')
38
+{% endhighlight %}
39
+
40
+ <p>
41
+ In addition, properties/values from source data objects can ba accessed from within event handler:
42
+ </p>
43
44
+{% highlight js linenos %}
45
+$('select').on('select2:select', function (event) {
46
+ console.log(event.params.data)
47
+});
48
{% endhighlight %}
49
50
</section>
0 commit comments