第一次想使用插件,就看看啦!jquery-confirm

http://craftpip.github.io/jquery-confirm/

首先来说这个插件我刚刚开始使用,使用并不是那么6666

  1. 使用初体验
    我没有使用sea.js进行管理,就使用一般的操作手段进行使用,简单的看看这个例子
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="./../../js/jquery-confirm/css/jquery-confirm.css">
    <link rel="stylesheet" type="text/css" href="./../../js/bootstrap/css/bootstrap.css">
    <script type="text/javascript" src="./../../js/jquery.min.js"></script>
    <script type="text/javascript" src="./../../js/bootstrap/js\bootstrap.js"></script>
    <script type="text/javascript" src="./../../js/jquery-confirm/js/jquery-confirm.js"></script>
    <script type="text/javascript" src="./confirm-function.js"></script>

</head>
<body>
<div class="col-md-3">
    <button class="btn btn-primary btn-block example-pc-3">Animations</button>
    <p class="text-success">Clean animations</p>

</div>

</body>
</html>
/**
 * Created by JetWang on 2016/6/25.
 */


$(function(){
    $(".example-pc-3").bind("click",function(){
        $.alert(
            {
                title : "你好啊",
                content: "这样真的好?"
            }


        );
    })
});

然后就是我们的效果图啦
这里写图片描述

是不是看上去非常的简单,这种控件怎么说呢,我们的使用的频率还是挺高的

  1. 确认信息对错
   $.confirm({
        title: 'Confirm!',
        content: 'Simple confirm!',
        confirm: function(){

        },
        cancel: function(){

        }
    });
  1. 简单的模态对话框
    $.dialog({
        title: 'Text content!',
        content: 'Simple modal!',
    });
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值