File: events.md

package info (click to toggle)
node-jquery-textcomplete 1.8.5%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 340 kB
  • sloc: javascript: 1,141; makefile: 7; sh: 6
file content (24 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Events
======

textComplete fires a number of events.

- `textComplete:show` - Fired when a dropdown is shown.
- `textComplete:hide` - Fired when a dropdown is hidden.
- `textComplete:select` - Fired with the selected value when a dropdown is selected.

```javascript
$('#textarea')
    .textcomplete([/* ... */])
    .on({
        'textComplete:select': function (e, value, strategy) {
            alert(value);
        },
        'textComplete:show': function (e) {
            $(this).data('autocompleting', true);
        },
        'textComplete:hide': function (e) {
            $(this).data('autocompleting', false);
        }
    });
```