【整理】最佳jQuery窗口插件(Modal Dialog Plugins)
在Ajax中经常用到的弹出窗口和遮蔽窗口。
Boxy插件使用:
【可参考:】
【jQuery boxy弹出层插件中文演示及讲解】http://www.zhangxinxu.com/study/200911/jQuery-plugin-boxy.html
-------------------------------------------------------------------
表单使用:
$(function(){
$(".userEdit").each(function(){
$(this).click(function(){
var editId = $(this).parent().attr("id").replace($(this).attr("class"),"");
var editValue = $("#userName"+editId).html();
var editHTML = "<div><div class='question' id='editQues'>用户名:<input id='boxyNameEdit' type='text' value='"+editValue+"' /></div><form class='answers'><input type='button' value='确认' class='boxy-btn1' /> <input type='button' value='取消' class='boxy-btn2' /></form></div>";
var editBoxy = new Boxy(editHTML,{title:"修改用户名",modal:true,closeable:false,unloadOnHide:true });
$(".boxy-btn2").click(function(){
editBoxy.hide();?????????
});
$(".boxy-btn1").click(function(){
var nowValue = $("#boxyNameEdit").val();
$(this).attr("disable","disabled");
$("#editQues").html("正在发送请求……");
$.ajax({
url:"edit_user.php",
type:"GET",
data:{userID:editId,userName:nowValue},
timeout:20000,
success:function(data){
if(data === "sucess"){
$("#editQues").html("修改成功!");
$("#editDelForm").submit();
editBoxy.hide();
}else{
$("#editQues").html("由于某些原因,修改失败,您可以试试刷新重试!");
}
},
error:function(){
$("#editQues").html("由于某些原因,修改出现错误,您可以刷新重试!");
}
});
});
return false;???????
});???????
});
---------------------------------------------
jQuery BlockUI Plugin
The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.
jQuery Impromptu
jQuery Impromptu is an extension to help provide a more pleasant way to spontaneously prompt a user for input. More or less this is a great replacement for an alert, prompt, and confirm. Not only does it replace these but it also allows for creating forms within these controls. This is not intended to be a modal replacement, just a quick tool to prompt user input in a fashionable way.
jQuery Alert Dialogs (Alert, Confirm & Prompt Replacements)
This jQuery plugin aims to replace the basic functionality provided by the standard JavaScript alert(), confirm(), and prompt() functions. What’s the benefit of using custom methods? These are completely customizable via CSS. You can set a custom title for each dialog. IE7 users get an ugly warning and usually have to reload the page if you use a regular prompt(). These methods simulate a true modal dialog box. They will automatically re-position themselves if you resize the browser window (unlike many existing dialog/lightbox-style plugins). If you include the jQuery UI Draggable plugin, the dialogs can be moved by dragging their title bars.
How to Create a Stunning and Smooth Popup Using jQuery
Nowadays, websites are more and more rich and interactive and users are becoming more and more critical with all things in websites. Using windows popup to show important information are in the air and We are going to learn how to create a stunning and great window popup from the scratch using jQuery in a simple and clean tutorial.
jQuery Ajax Validation Contact Form with Modal + Slide-in Transition
Due to popular demand, here is a tutorial on how I created one of the more complicated pieces of machinery on my new site: the contact form. All you need is jQuery. No plugins are necessary for this to work, and it is only 2kb of extra code in addition to the jQuery library. This also works on all browsers, IE6 and up.
Creating an Exit Modal Box using jQuery
Do you need to show a specific message to the visitors that leave your website? You can do that by initiating a modal box before they close the browser window. To do this we need to include 2 JQuery files (the actual library and a plugin written by Eric Martin), the modal box’s CSS and the file that triggers the modal box based on the user’s action.
Upload in Modal Window and Pass Values with jQuery
Do you publish your blogs with Wordpress? If yes, you know the inline popup window which opens if you like to upload / insert an image into your article. This tutorial shows you how-to use the jQuery Plugin ThickBox and some jQuery code to upload a file and pass a value to the parent page. You can use this kind of feature in your custom CMS or maybe you like use it as a basic for your own file upload plugin or gadget?
jQuery Modal Choose Component
This original article is written in Italian, but here is the translated English version. I wanted to be sure and include this in the rundown because it gives another option on how to allow users to choose values for a form field. It’s designed as an alternative to the combo box, or select dropdown menu. It’s not perfect, but it’s an interesting take on a common UI component and I believe deserves to be on the list.
---------------------------------------------
JQuery Modal Choose Component 效果图片:
---------------------------------------------
jQuery Modal Dialog Plugin
This plugin link goes to the working example and documenation page that shows off some real nice jQuery modal dialogs for errors, warnings, prompts and more. Getting to the download is a little tricky unless you follow this link to download.