The pop-up window in the lower right corner is widely used on the Internet. Although this method will greatly affect the user experience, we still have to do this if the leaders have this requirement. The following is an example of a newly written pop-up window. Scroll: Keep it at the bottom of the right side of the page while resize: Keep it at the bottom of the right side of the page when the browser changes.Effect demonstration
Shows the effect in the lower-right corner.
This article uses TerryFeng as an example.Html and JS Code:Copy codeThe Code is as follows:WebService parameter 1 WebService parameter 2 In Dialog! Author blog: http://www.cnblogs.com/qixuejia/
First prepare juqury-ui, Ztree js files and CSS files, the next step Xiang see this article hope to help you
The first step: First prepare Juqury-ui, Ztree js files and CSS filesStep two: Write in example.jsp file code
Copy Code code as follows:
.. Introduction of jQueryUI, Ztree js and css file
function Gettree () {
var url = " var setting={
};
var znodes =[];
var option={
width:200,
hight:300
};
$.ajax ({
Url:url,
success:function (data) {
$.each (data,funtion (n,
1st methods:
Code: $ ("# dialog"). Parent (). appendto ("/html/body/form [0]");
2nd methods:
Add a div such as
$ ("# Dialog"). Parent (). appendto ("# dialog_target ");
3rd methods:
1. Modify the dialog JS Code and add the code to the form instead of the body.2. The custom HTML in dialog is not used. Instead
Sometimes you need to add a prompt effect to some elements in the webpage to enrich the information, such as the title in the link. You can use the jquery plug-in wtooltip to display the window tool. The default prompt content is title, you can customize the content and CSS style of the prompt, as shown below:
Instructions for useYou need to use the jquery library file and the wtooltip Library File
Use inst
Var dialog = art. dialog ({Title: 'Welcome ',Content: 'Welcome to the artDialog dialog box component! ',Icon: 'sudoed ',Follow: document. getElementById ('btn2 '),OK: function (){This. title ('Warning '). content (' Please note that artDialog will be disabled in two seconds! '). Lock (). time (2 );Return false;},Button :[{Name: 'approval ',Callback: function (){T
One, add the Information dialog box Http://www.w3cschool.cc/try/tryit.php?filename=jqueryui-example-dialog-modal-form,Modal Forms | Modal message two, slider (can be used in delay days)Http://www.w3cschool.cc/jqueryui/example-slider.htmlHttp://www.w3cschool.cc/try/tryit.php?filename=jqueryui-example-slider-rangemaxThree, rotary deviceHttp://www.w3cschool.cc/jqueryui/example-spinner.htmlIv. Tool tip box (for
Copy codeThe Code is as follows:
$ (Function (){
$ ("# Open"). click (function (){
OpenDialog (a1); // call it. Simply write the div id.
});
});
Var openDialog = function (o ){
Var dialog = new zzlDialog (o );
Dialog. open ();
}
Var zzlDialog = function (o ){
This. init = function (){
/* Initialize the dialog box */
Var XBox = '\
Shadow pop-up box \
';
$ (Docume
First defines a black, transparent Div, when clicked, pops the dialog that needs to be displayed, displays the mask layer, closes the dialog box, and hides the mask layer. Note that the Z-index value of the dialog box is larger than the mask layer.
. mask{position:absolute;
background-color: #000;
opacity:0.5;
z-index:99;
top:0px;
width:100%;
height:100%;
The style is a little ugly. For this reason, I re-create a style. When I thought it was finished, I found that the work on IE was abnormal, and the self-adaptive size could not be achieved.It used to require xhtml, while the company's products were html. To this end, we have studied the implementation of adaptive size.It turns out that jquery is amazing to take the width and height. It turns out that it is directly taking the offsetWidth/offsetHeight
We use popular jquery design, at the same time we choose more effective boxy pop-up plug-in extension (about the relevant information about boxy, please refer to Zhang xinxu blog http://www.zhangxinxu.com/wordpress? P = 318 ). The following describes the application of boxy as the selector framework.
For selector, I believe there will be no stranger to anyone who has used recruitment websites (that is, those who click it to pop up and select industri
We use popular jquery design, at the same time we choose more effective boxy pop-up plug-in extension (about the relevant information about boxy, please refer to Zhang xinxu blog http://www.zhangxinxu.com/wordpress? P = 318 ). The following describes the application of boxy as the selector framework.For selector, I believe there will be no stranger to anyone who has used recruitment websites (that is, those who click it to pop up and select industries
Click here to download Jquery-ui-1.8.16.custom.zip, you can find him in the website's UI. Copy the External,themes,ui from the Development-bundle folder into your project
Introduction of the corresponding CSS and JS can view plain Introduction of Jquery-1.6.2--> nBsp;
In web design, whether it is to reduce the unfriendly user experience caused by PAGE jump or to maintain the use habits of desktop applications, the design of the dialog box is indispensable. Currently, the JqueryUI dialog box supports ease of use. The sample code is as follows:
The Code is as follows:
var dialog = Art.dialog ({Title: ' Welcome ',Content: ' Welcome to the Artdialog dialog box component! ‘,Icon: ' Succeed ',Follow:document.getElementById (' btn2 '),Ok:function () {This.title (' warning '). Content (' Please note that Artdialog will turn off after two seconds! '). Lock (). Time (2);return false;},Button: [{Name: ' Agree ',Callback:function () {This.content (' You agree '). Time (2);return f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.