Toggle ()
Toggles the visible state of the element.
If the element is visible, switch to hidden, and if the element is hidden, toggle to visible.
---------------------------------
Example
Toggles the visible state of all paragraphs.
HTML
In addition, sometimes you might want to know the specifics of the style added to an element or link. The Style property can only read the inline form of the element, so if you want to read the other styles, you'll have to find another
Offset
The offsettop and offsetleft two attributes of the elements in all browsers are useful. They will give you the coordinates of the element relative to the parent element.
This code looks up offsetparent, and then adds offsettop and offsetleft.
If the page contains a valid DOCTYPE declaration, it is rendered in strict mode.
If the page does not have a DOCTYPE declaration or a valid DOCTYPE declaration, it is rendered in compatibility mode.
There is a difference between the two modes, the
One accepts two input parameters: style attributes and style values, separated by commas. For example we want to change the link color, we can use the following code:
Copy Code code as follows:
$ ("#61dh a"). css (' color ', ' #123456
Use a global variable to save the last open object
College Information Advanced Education Enrollment Information Latest lectures School activities 1 currency conversion, the following figure shows the program The child simply puts
CSS and JS closely with, for our pages add a lot of chic effect. In order to achieve a particular effect we need to dynamically change the CSS properties of a particular label using JavaScript.
For example, the commonly used closure of a floating
Oo, object-oriented, significantly reduced by the amount of inherited code
The X in Jxtree represents XML and can be implemented with infinite levels of memory allowed
Compatible with IE Firefox, this is the principle I have always
Guys,
Title 1 title 2 title 3 title 4 title 5 title 6 Enter to see the effect!
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
In general, the Web page inside the JS file or code, are placed in the bottom of the page front, this is because the Web page loaded from the top down, users visit our page as far as possible because the load JS show too long blank page, stay too
Effect of Flash div+css+js menu
css menu G1 good morning G2 good evening M1 my name is fireyy ;/div> M2mm mm I love u G1 good morning G2good evening M1 my name is fireyy &L
T;/div> M2 mm mm I love u
Way One: Directly write code implementation
The effect is as follows:
The code is as follows:
Copy Code code as follows:
Menu without table
Home
News
Sports
Weather
contact me
mode two: using jquery
New Document move background transform Move Background Transform Mobile Background transform Mobile background transform move background transform
[Ctrl + A All SELECT Note: If the need to introduce external JS need to
Browsing some websites, often see the page link js css behind always with some parameters, today in detail to check:
In this case, there are two main possibilities:
The script does not exist, but is dynamically generated by the server side, with
Progress bar, is in the user enters your website, can let the user see the webpage downloading how many, this function is very obvious---is lets the user wait for the time to become longer, may effectively make up the space slow shortcoming (of
First step: Need to master the abbreviation of CSS skills refer to the following article to CSS abbreviations optimize the size of CSS files CSS common attribute abbreviations [recommended] Step two: Format and compress tools with CSS Step
The image above is after the CSS and jquery beautification effect, how? Isn't it cool? This is an effect I saw from another script library, and it was pretty good, and then I realized one with jquery. For everyone to appreciate!
Say not much,
untitled document &
Lt;style type= "Text/css" > p{font-size:12px;
font-family:arial;
} input{Cursor:pointer; } "Yellow fade" effect
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Test code:
Copy Code code as follows:
jquery Css test
test
Pop-up box display information:
IE8:
IE7:
IE6:
Firefox:
Chrome:
Opera:
The following are all the same, and the string type is
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