个人静态博客说明
sufangyu / dialog.js Goto Github PK
View Code? Open in Web Editor NEW移动端Dialog弹出对话框插件,同时支持jQuery和Zepto
移动端Dialog弹出对话框插件,同时支持jQuery和Zepto
我需要验证一个表单,当onClickOk返回return false,不能阻止关闭动作了
$.dialog({ type : 'confirm', titleText:'', html:'', onClickOk:function(){ if($.trim($('#xxx').val()) == ''){ alert('该字段不能为空') return false; }else{ ... } } });
发现contentHtml有文本框时,在手机(iphone)上不能输入,请问如何解决
$.dialog({ type : 'confirm', contentHtml : '<input type="text" /> ', onClickOk : function(){ alert('你点了确定~~'); } });
$.ajax({
type:'post',
url:url,
beforeSend:function () {
$.dialog({
type : 'info',
infoText : '加载中…',
infoIcon : 'images/icon/loading.gif',
autoClose : 2500
});
},
success:function (msg) {
$.dialog.close();
if(msg.state == 'fail'){
$.dialog({
contentHtml : msg.info,
});
}
}
})
这种情况下,只显示 beforeSend 里面的 loading ,无法显示 success 里面的 dialog !
弹出框之后背景都变成了白色
buttonText : {
ok : '确定',
cancel : '取消',
delete : '删除'
},
delete是关键字,且没有使用,是否可以移除
页面上同时使用了dialog.js和一个前端markdown的插件(markdown-plus.min.js):http://mdp.tylingsoft.com/
dialog.js使用的是confirm类型,但是click之后提示:Uncaught TypeError: $.dialog is not a function
调试时能看到$符号使用的并不是dialog.js内部的,而是markdown-plus.min.js内的对象。
是否有办法避免这种冲突?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.