Specific principles and calls are not detailed, you can see code comments and Demo demo (Demo Mod.udata.js has a Chinese pinyin method, it is not a part of the plug-in, but for Plug-ins to provide a phonetic search function).
Copy Code code
Online Demo: Portal
HTML code (placed anywhere on the page and embellished with CSS):
Copy Code code as follows:
back to top
JS Code:
Here's a simple point to return the top code:
Effect first See demo:
The method returns a string of decimal digits, which is tested under jquery1.9.2.
Copy Code code as follows:
(function ($) {
$.MD5 = function (o) {
if (null = = O) {
return ' null ';
}
if (typeof o!= "string") {
return ' null ';
}
Mode 1:
Copy Code code as follows:
$ (function () {
Initpublish ();
});
Description: Initpublish () is the JS function you want to run; This code is placed at the lowest end of the page.
Mode 2:
Copy Code code as
Pop-up layer effect on many sites are used, today to organize the recent project to use a small effect, click on the collapse of a layer to fill out information to the user. Pop-up layer code is JQ dynamic creation, everyone writing is different,
A short span of more than 10 lines of code to achieve a cool picture tumbling code, to achieve this effect is not difficult, as long as the idea of the right, all good to do, not to say, directly on the code to see the effect!
HTML structure:
The functionality and usage for the extension of the text field:1, get the cursor position: $ (elem). Igetfieldpos ();2, set the cursor position: $ (elem). Iselectfield (start);3. Select the character in the specified position: $ (elem).
The following code block will always let the pop-up div located in the center of the screen, I hope to help!
Copy Code code as follows:
Let the specified div always appear in the middle of the screen
function Setdivcenter (divname) {
var
This code is extracted from the jquery.form.js, because the use of this method is very strong, but also can be used independently.This piece of code is concise and can be a good reference for learning.
Copy Code code as follows:
/**
*
Copy Code code as follows:
Alert ($ (window). Height ()); Browser current window visual area height
Alert ($ (document). Height ()); The height of the browser's current window document
Alert ($ (document.body). Height ());//browser
Plugin Download: https://github.com/GBKS/Wookmark-jQueryOfficial homepage: Http://www.wookmark.com/jquery-plugin
After downloading the plugin, refer to the plug-in's JS file in the Web page:
Copy Code code as follows:
HTML
Implementation code:
Copy Code code as follows:
Method Description: The The height of the page, minus the height of the scroll and subtracting the layer with the ID widget, equals the height at the bottom of the layer; when the
Copy Code code as follows:
$ ("input"). attr ("Checked", "checked")
After setting the checkbox does not become selected, with Chrome debugging, the checkbox does have the Checked property, and the value is checked, but the page
Use jquery to achieve the waterfall flow effect, we refer to the use of it, run can see the effect of the code in the JQ introduced must be replaced by their own only good
Copy Code code as follows:
AJAX
$page = isset
Toggle () Event It mainly toggles the visible state of the element.
1, toggle (switch) ①switch is an optional value, if not filled out the original element is the display will be hidden, if it is hidden display.
HTML Code:
Copy Code code as
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service