Get started with jquery.textcomplete CDN

MIT licensed

JQuery.textcomplete: Real-time text suggestion plugin for web forms.

Tags:
  • jquery.textcomplete

Stable version

Copied!

How to start using jquery.textcomplete CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with jquery.textcomplete CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/base/jquery-ui.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/textComplete.min.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
    <script src="https://cdn.cdnhub.io/jquery.textcomplete/1.8.5/jquery.textcomplete.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/textComplete.min.js"></script>
    <script>
        $(function() {
            $('#textcomplete').textcomplete([
                {
                    match: /^(hello|hi|hey) (.+)/,
                    replace: function(term, suggestion) {
                        return term + ' ' + suggestion;
                    },
                    source: ['Alice', 'Bob', 'Charlie']
                }
            ]);
        });
    </script>
</head>
<body>
    <textarea id="textcomplete"></textarea>
</body>
</html>
Copied!
Copied!
Copied!

All versions