be modified externally. Add in front of the closure pack; is to prevent the code from merging, if the code before the closure is missing a semicolon, resulting in a subsequent error.
Merge
;(function ($) {
///define plug-in
$.fn.foo = function (options) {
//dosomething ...
}
Private Functions function
Debug () {
//dosomething ...
}
Define the exposure function
$.fn.foo.saycolor = functions () {
//dosomething ...
}
Plugin default parameter
$.fn.foo.defa
You waste
Note:
1. You do not need to add the onclick Method to the button to add all functions to $ (function.
2. Three files need to be introduced, including two JS files and one CSS file.
Jquery UI dialog usage Overview
OverviewA floating window contains the title and content. You can move, resize, and close the icon '× '.If the content length exceeds the display in the dialog box content area, t
This article mainly introduces information about the plug-in used to simulate alert using jquery. For more information, see the following demo address:
Http://runjs.cn/detail/miwszbne
Sharing instructions:
The Nth wheel was created, only for the simplest call. jquery simulates the pop-up window plug-ins of alert and confirm.
Call method:
$.alert('your message'
This article introduces the pop-up login window based on the combination of jquerydivcss and the general idea is as follows: The dispaly: none attribute is hidden in the display first, if you are interested, take a look at the code implementation process. The specific code details are as follows:
The basic idea is to hide (dispaly: none) and then display it. The translucent mask layer passes through
Z-index: 9998;Z-index: 9999;
The larger the value,
The pop-up window prompt plug-in created by jquery contains multiple modes. For more information about the functions with receipt function values, see
The Code is as follows:
This article will introduce jQuery ready and window. onload usage to you. If you are interested, please refer to it.
I recently worked on a project and wrote a plug-in the previous article: jQuery rolling fixed plug-in. I tested it locally at the beginning and found it was okay. Then I set it up on the server, it is found that the final position of the float is a
This article introduces the knowledge of the jquerymobile pop-up window and pop-up layer, involving the knowledge of the jquerymobile pop-up. This article is very good and has reference value. if you need it, please refer to it.
Create a form first
ClosePop-up window content
1) click to bring up
Button
2) after the page is loaded, it will pop up.
// The script setTimeout (function () {$ ("# popupVie
;
P
>
Body
>
Html
>
The call is relatively simple. The scripts are Popup. js and popupclass. js. Popupclass is the original Js of Baidu Network (in fact, it is not exactly the same, because I think it is difficult to see the close icon in the pop-up window, so I changed it ~~~~) Popup. JS is a call method that I extract based
The page will often have a window, and some of the window is dynamically generated, and some of the window is hidden at the bottom of the page, for dynamically generated window, if you want to listen to the events of the window, you can use
("#父窗口元素ID", window.parent.document); The corresponding JavaScript version is window.parent.document.getElementByIdx_x ("Parent window Element ID");The element method to take the parent window: $ (selector, window.parent.document);Then you take the parent window of the element can be used: $ (selector, window.parent.parent.document);Similarly, the method of takin
(#父窗口元素ID, window.parent.document), corresponding JavaScript version to window.parent.document.getElementByIdx_x ("Parent window Element ID"); takes the element method of the parent window: $ (selector, window.parent.document); then you can take the element of the parent window of the parent window to use: $ (select
The page will often have a window, and some of the window is dynamically generated, and some of the window is hidden at the bottom of the page, for dynamically generated window, if you want to listen to the events of the window, you can use
This example describes the jquery implementation click Popup Div Layer window effect. Share to everyone for your reference. Specifically as follows:
This is a jquery implementation can be dragged off the pop-up box effect, the Internet has a lot of similar effects, the Web page to achieve this effect is not difficult,
JQuery Mobile Popup Key code:Attention:!!Auto-enhanced Type button, can I disable it?Add a property of data-role= "None" toJQuery Mobile pop-up window effect
"C #"autoeventwireup="true"codefile="Default.aspx.cs"inherits="_default"%>"http://www.w3.org/1999/xhtml">"Server">"Content-type"Content="text/html; Charset=utf-8"/> "Form1"runat="Server"> "Button"Value="Popup"Id="BTN1"/> "TC"> "Tc-top"> here is the title "Tc-main"> Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there may be a lot of words AH!! Here is the content, there
Source: gbin1.comDownload online Demo OnlineThe Hidden modal window technique is a good solution for dealing with interface elements that are not necessarily unique to the Web page. Social networks can use modal windows to communicate private messages and forms that are only visible to members. The blog and magazine sites also apply to the author landing page, which is separate from the main site, and modal windows are easier than creating new windows
user.
Development log
The JS modal window will be captured on the net. After some reference, I decided to include this in one of my many "original projects, after all, windows are frequently used in WEB development. From the version release log, it can be seen that this item has been repaired and supplemented for some time. It is basically an initial version, but I will continue to improve it, in the process, I had the opportunity to refer to the
, after all, in the web Development window or use very frequently. From the release of the log can also be seen, this thing has been tinkering with a period of time, basically now is still an initial version, but I will insist on constantly improve it, the process of learning to learn the jquery, FCKeditor and other large JS project framework, a lot of income At the same time, and once again experienced JS
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.