js弹出框轻量级插件jquery.boxy使用介绍
更新时间:2013年01月15日 15:52:02 作者:
今天我介绍一个轻量级的插件 boxy!它可以把美工设计的弹出框很容易的体现出来,而且兼容性还不错,感兴趣的朋友可以了解下
当你需要使用弹出框时,当然可以使用jquery-ui,artdiag,blockUI等等,但今天我介绍一个轻量级的插件 boxy!它可以把美工设计的弹出框很容易的体现出来,而且兼容性还不错!
<script type='text/javascript'>
$(function() {
$('#ask-actuator').click(function() {
Boxy.ask("How are you feeling?", ["Great", "OK", "Not so good"], function(val) {
alert("You chose: " + val);
}, {title: "This is a question..."});
return false;
});
$('#alert-actuator').click(function() {
Boxy.alert("File not found", null, {title: 'Message'});
return false;
});
$('#confirm-actuator').click(function() {
Boxy.confirm("Please confirm:", function() { alert('Confirmed!'); }, {title: 'Message'});
return false;
});
});
</script>
你可以根据你的需要,把内容的ID替换到Boxy(content)中的content位置,方便之极。
复制代码 代码如下:
<script type='text/javascript'>
$(function() {
$('#ask-actuator').click(function() {
Boxy.ask("How are you feeling?", ["Great", "OK", "Not so good"], function(val) {
alert("You chose: " + val);
}, {title: "This is a question..."});
return false;
});
$('#alert-actuator').click(function() {
Boxy.alert("File not found", null, {title: 'Message'});
return false;
});
$('#confirm-actuator').click(function() {
Boxy.confirm("Please confirm:", function() { alert('Confirmed!'); }, {title: 'Message'});
return false;
});
});
</script>
你可以根据你的需要,把内容的ID替换到Boxy(content)中的content位置,方便之极。
相关文章
jQuery中的height innerHeight outerHeight区别示例介绍
这篇文章主要介绍了jQuery中的height innerHeight outerHeight的区别,需要的朋友可以参考下2014-06-06
浅谈jQuery this和$(this)的区别及获取$(this)子元素对象的方法
下面小编就为大家带来一篇浅谈jQuery this和$(this)的区别及获取$(this)子元素对象的方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧2016-11-11
jQuery.datatables.js插件用法及api实例详解
这篇文章主要介绍了jquery插件之jQuery.datatables.js用法及api实例详解,本文给大家介绍的非常详细具有参考借鉴价值,需要的朋友可以参考下2016-10-10


最新评论