Get started with layui CDN

MIT licensed

Layui is a lightweight JS UI framework for developing responsive web applications.

Tags:
  • layui
  • ui
  • JavaScript Framework
  • toolkit
  • front-end component library

Stable version

Copied!

How to start using layui CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with layui CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui/css/layui.css">
    <script src="https://cdn.cdnhub.io/layui/2.9.7/layui.js"></script>
</head>
<body>
    <button id="test">Test</button>

    <script>
        layui.use(['jquery'], function() {
            const $ = layui.$;
            $('#test').on('click', function() {
                layer.msg('Hello, Layui!');
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions