ztechno_core 中文文档教程
ztechjqueryext
扩展 JQuery 库以获得更紧凑的代码库
要求
安装
NPM
npm install ztech_jquery_ext
纱线
yarn add ztech_jquery_ext
CDN - jsDelivr
<link href="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/css/ztech_jquery_ext.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
CDN - UNPKG
<link href="https://unpkg.com/ztech_jquery_ext/dist/css/ztech_jquery_ext.min.css" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
TypeScript 支持
以便包含类型在 tsconfig.json 中添加以下内容
{
"compilerOptions": {
"types": ["ztech_jquery_ext"]
}
}
或者在 javascript/typescript 文件的顶部添加以下引用 使用
/// <reference types="ztech_jquery_ext" />
包含
jQuery
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
包含插件 JS
<script src="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
使用
// [JQuery, JQuery, JQuery, ...]
var rows = $('.row').$arr();
// [number, number, number, ...]
var userids = $('.user').$map(function ($ele) {
return $ele.attr('id');
});
许可证
MIT
使用 :heart: create-jquery-plugin
ztechjqueryext
Extends JQuery library for more compact code base
Requirements
Installation
NPM
npm install ztech_jquery_ext
Yarn
yarn add ztech_jquery_ext
CDN - jsDelivr
<link href="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/css/ztech_jquery_ext.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
CDN - UNPKG
<link href="https://unpkg.com/ztech_jquery_ext/dist/css/ztech_jquery_ext.min.css" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
TypeScript Support
In order to include types add the following in tsconfig.json
{
"compilerOptions": {
"types": ["ztech_jquery_ext"]
}
}
Alternatively Add the following reference at the top of the javascript/typescript file
/// <reference types="ztech_jquery_ext" />
Usage
Include jQuery
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
Include Plugin JS
<script src="https://cdn.jsdelivr.net/npm/ztech_jquery_ext/dist/js/ztech_jquery_ext.min.js" type="text/javascript"></script>
Usage
// [JQuery, JQuery, JQuery, ...]
var rows = $('.row').$arr();
// [number, number, number, ...]
var userids = $('.user').$map(function ($ele) {
return $ele.attr('id');
});
License
MIT
Created with :heart: create-jquery-plugin