Get started with require.js CDN

MIT licensed

Require.js: Popular library for managing asynchronous JS script dependencies and optimization.

Tags:
  • loader
  • modules
  • asynchronous

Stable version

Copied!

How to start using require.js CDN


<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.cdnhub.io/require.js/2.3.6/require.min.js"></script>
    <script>
        require.config({
            paths: {
                'jquery': 'https://code.jquery.com/jquery-3.6.0.min'
            }
        });

        require(['jquery'], function($) {
            $(function() {
                // Your code here
                console.log('jQuery loaded');
            });
        });
    </script>
</head>
<body>
</body>
</html>
Copied!
Copied!

All versions