6 Star 7 Fork 0

自由自在的小鱼 / jquery plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

jquery.pagination.js

输入图片说明

输入图片说明

输入图片说明

jquery.selectTree

输入图片说明

jquery.validator

表单提交验证

参数

before: function() {},
success: function() {},
error: function() {},
timeout: 600,
language: 'cn'

方法

<form id="loginForm" action="post.php" method='post'>
<input type='text' data-required='true' data-length='6,16' data-regular='cn' value=''/>
</form>
$('#loginForm').validator({
  success:function(data) {
    //code here
    window.location.href='/';
  }
});

data-regular可以是cn,en,num,char,password,url,email,ip,qq或者自定义正则表达式

截图

输入图片说明

jquery.box

针对AdminLTE模板所做的一个Box控件,可以生成最大化、折叠、刷新、关闭按钮,同时针对ajax加载的页面进行控制box按钮的操作。

参数

speed: 500,
collapseIcon: 'fa-minus',
expandIcon: 'fa-plus',
removeIcon: 'fa-times',
refreshIcon: 'fa-refresh',
minimizeIcon: 'fa-window-minimize',
maximizeIcon: 'fa-window-maximize',
listenBody: true,
refresh: {
    url: '',
    type: 'get',
    data: {},
    async: true,
    dataType: '',
    beforeSend: function () {
    },
    error: function () {
    }
}

方法

toggle    折叠或展开       对象
expand    展开            对象
collapse  折叠            对象
remove    关闭            对象
refresh   刷新            对象
window    最大/小化box    对象
maximize  最大化box       对象
minimize  最小化box       对象
addBtn    自动增加btn     无参数

方法的调用方式

$.fn.box('toggle','.box');

调用

<script src="assets/js/jquery.box.min.js"></script>

自动生成btn,需要在box加上class

box-collapse    折叠或展开按钮
box-remove    关闭按钮
box-refresh    刷新按钮
box-maximize    最大化按钮

自动关闭的BOX

<div class="box box-warning box-remove collapsed">
    <div class="box-header with-border">
        <h3 class="box-title">待审核作者</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body" id="authorBox">
        The body of the box
    </div>
    <!-- /.box-body -->
</div>

带有刷新的BOX,自动加载url内容,注:通过ajax加载的页面无法自动加载。

<div class="box box-success box-remove box-refresh" data-refresh='{"url":"/"}'>
    <div class="box-header with-border">
        <h3 class="box-title">待审核小说</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
    </div>
    <!-- /.box-body -->
</div>

data-refresh如果是字符串,默认为url,如果是json,是ajax使用的参数。例如:

data-refresh='{"url":"/","type":"post","data":{"id":1}}'

ajax加载的页面无法自动生成btn,需要调用

$(".box").box('addBtn');

或者html直接写入btn代码

<div class="box box-warning box-remove box-maximize collapsed">
    <div class="box-header with-border">
        <h3 class="box-title">待审核作者</h3>
        <!-- 按钮 -->
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-box="collapse">
                <i class="fa fa-minus"></i>
            </button>
        </div>
        <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body" id="authorBox">
        The body of the box
    </div>
    <!-- /.box-body -->
</div>

bootstrap 调用

<div class="panel panel-default box box-remove box-collapse">
  <div class="panel-heading box-header">Panel heading without title</div>
  <div class="panel-body box-body">
    Panel content
  </div>
</div>

截图

输入图片说明

MIT License Copyright (c) 2020 自由自在的小鱼 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

根据项目的需求所写的一些jquery插件, 分页、选择树、表单验证、box 展开 收起
JavaScript 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/hbbcs/jquery.box.git
git@gitee.com:hbbcs/jquery.box.git
hbbcs
jquery.box
jquery plugin
master

搜索帮助