您的位置:首页 > Web前端 > JQuery

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

2016-06-30 21:09 513 查看

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

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

使用初体验

我没有使用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: "这样真的好?"
}

);
})
});


然后就是我们的效果图啦



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

确认信息对错

$.confirm({
title: 'Confirm!',
content: 'Simple confirm!',
confirm: function(){

},
cancel: function(){

}
});


简单的模态对话框

$.dialog({
title: 'Text content!',
content: 'Simple modal!',
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: