Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Is layui based on jquery?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "whether layui is based on jquery". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Layui is based on jquery, is a UI framework written in its own module, and comes with its own jquery;. The way to use jquery within layui is "layui.use ('jquery',function () {var $= layui.$ jQuery code})".

The operating environment of this tutorial: windows10 system, jquery3.2.1&&layui v2.6.8, Dell G3 computer.

Is layui based on jquery?

Layui is a jQuery-based framework with its own jQuery.

Internal use of jQuery in layui

According to the official recommendation, it is better to use your own.

Here is a note of the internal use of jQuery:

Layui.use ('jquery', function () {var $= layui.$ / / key points / / after that just like you usually use jQuery})

Assign to $, or layui.jquery.ajax uses ajax

$= layui.jquery

If no value is assigned, an undefined prompt for $appears.

Expand knowledge:

Layui is a front-end UI framework written with its own module specification, which follows the writing and organization form of native HTML/CSS/JS. The threshold is very low, and it is ready to use. Its external minimalism, yet full inside, lightweight, rich components, from the core code to the API every detail has been carefully crafted, very suitable for the rapid development of the interface. The first version of layui, released in the fall of 2016, is different from those UI frameworks based on the underlying MVVM, but does not go against the road, but believes in a return to basics. To be exact, it is more tailor-made for server programmers, developers do not need to get involved in the complex configuration of various front-end tools, just face the browser itself, which makes the development very convenient.

Why use layui?

Layui is more aimed at back-end developers, so it resolutely adopts the browser-hosted AMD-like module management style of a few years ago, but it is not limited by the rules of CommonJS. It has its own model, which is lighter and simpler. Layui is defined as "classic modularity", not to emphasize the concept of "module" itself, but to avoid the mainstream solutions of the current JS community and try to interpret efficiency in as simple a way as possible! Its so-called classic lies in its obsession with going back to basics, and it organizes modules in a way generally accepted by current browsers! Layui believes that this lightweight organization can still fill many scenarios other than WebPack. So it insists on using classic modularization, which allows people to avoid the complex configuration of tools and return to the original HTML/CSS/JavaScript itself!

Compatibility and scenario orientation

Layui is compatible with all browsers being used by human beings (except IE6/7), and can be used as a rapid development solution for the background system and foreground interface on the PC side.

Main module

Layui provides a wealth of built-in modules that can be loaded on demand in a modular way, including: layer, layDate, layPage, laytpl, table, form, upload, element, tree, layeditor, rate, carousel, flow, util, code, etc.

This is the end of the content of "is layui based on jquery"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report