In jquery
Both the toggle and slidetoggle methods can display and hide an element. Powerful ~
The difference is:
Toggle: the dynamic effect is from right to left. Horizontal action.
Slidetoggle: the dynamic effect goes from bottom to top. Vertical action.
So, for example, if you want to achieve the dynamic effect of a tree from bottom to top, you can use
Show (), Hide (), toggle (), Slidetoggle () is the basic animation function in jquery, look at these four seemingly simple, but interactive, powerful functions.
1.show () displays an element
There are four types of argument lists for the show () function, respectively
A. () No participation
B. (duration,complete) Duration: Duration [default 400ms] (value type can be string or number) {You can also use ' slow ', ' fast ', ' normal '} Complete: callback
There are several ways to display and hide an action element.For example:
Change style display to none
Set position height to 0
Set the transparency to 0
Can achieve this, and it provides a way to deal with jquery. Show/hide, Sildedown/sildeup, Fadein/fadeout. In addition, toggle, Sildetoggle, and Fadetoggle switching methods are introduced.The difference between toggle, Sildetoggle, and Fadetoggle:
Toggle: Toggle Display and hide effects
Sildetoggle: Toggle ro
Problems and solutions of Jqury Slidetoggle scintillation
Solving methodwhere "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" is required, if less this sentence will still have flashing problems, specifically why I am not quite sure
The slideToggle () method uses the sliding effect (height change) to switch the visible state of the element. Instance
Switch between the display and hide states by using the sliding effect
Element:
The Code is as follows:
$ (". Btn1"). click (function (){$ ("P"). slideToggle ();});
Definition and usage
The slideToggle () method uses the sliding effect
There were very few things learned yesterday, and some things were delayed. It was good today, And it entered the State in the morning. Although it was a bit cold, there was a catch of cold.
SlideToggle (speed, [callback]) in the sliding effectSpeed: Three predefined speeds ("slow", "normal", "fast") and millisecond values (for example, 1000) that indicate the animation duration)[Callback] function executed when the animation is completedExample:Html:
InstanceBy using the slide effect, you can switch between the display and hide States Copy codeThe Code is as follows:$ (". Btn1"). click (function (){$ ("P"). slideToggle ();}); Definition and usage The slideToggle () method uses the sliding effect (height change) to switch the visible state of the element.If the selected elements are visible, these elements are hidden. If the selected elements are hidden,
Instance
Toggle the
Copy Code code as follows:
$ (". Btn1"). Click (function () {
$ ("P"). Slidetoggle ();
});
Definitions and usage
The Slidetoggle () method toggles the visible state of an element by using a sliding effect (height change).
If the selected element is visible, the elements are hidden, and if the selected element is hidden, the elements are displayed.
Grammar
$ (sel
[JQ] What is the difference between toggle, slideToggle, and fadeToggle? jqslidetoggle
Summary:
Toggle performs animation transition on the visible style attributes of the entire element
SlideToggle only performs high-transition processing on Elements
FadeToggle only performs transparency transition on Elements
Toggles the visibility of all matching elements by the height change, and optionally triggers a callback function after the switch is complete;This animation effect only adjusts the height of the element, allowing the matching elements to be hidden or displayed in a "swipe" manner. In jquery 1.3, the upper and lower padding and margin will also be animated, with smoother resultsInstance:[jquery effect Slidetoggle ([SPEED,[EASING],[FN]]) This method is
Div left on left to show CSS left to left (body sense music)Div left on the right to display the chapterDiv on the right to the left needs CSS style word for CSS floating float, set float:left can realize div box
Margin-left is the margin, the width margin-left is the left margin, and the distance from the left element.
Left is a point located at the left of the upper left corner of the box.
Essence of C/C ++ left
(3) Conversion of left values
1. Conversion from left to right
Let's take a look at an example:
Int I = 10;
The compiler opens a space in the memory with a sizeof (INT) byte. It initializes the space with an integer of 10 and names it as I. I belongs to the left value. When I is placed in the
Table-cell completes the left-side, right-side, left-side, and left-side la S, and table-cell la S.Use table-cell to complete the following la S (compatible with ie8 and later) 1. left-side fixed width-right-side adaptive
.left{ width: 300px; height: 5
Essence of C/C ++ left
(2) which expressions are left and right?
1. Left expression
As described in the previous section, the left value has an object or an incomplete type. In C ++, it also has a function or reference type. However, an expression that does not have the above type is the
, these two values are displayed only when the content exceeds the element. For example, if the width is PX, but the actual content is PX, when you drag the scrollbar to the middle position, the content is greater than 25 PX for each element, and the scrollLeft value is 25. Therefore, scrollLeft refers to the distance between the current left boundary of the content and the actual left boundary of the conte
Essence of C/C ++ left
(1) past and present on the left
The left value (lvalue) is the attribute of the C/C ++ expression. Only one expression can be used to talk about its left value.
The left value has been around for a long time. It existed before the emergence of the wo
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.