This article is a performance test of the various show/hide methods of jquery. The author tests the sentence from Robert Duffy's jquery conference in SanFrancisco: ". Hide () and. Show () execute faster than the direct change of CSS." However, the author did the test on his own because he could not find robertduffy to
"content" need to be consistent with the ellipsis "..." before the text is repeated.The reason: Because the ellipsis "..." before the text will be clicked "View full Text" button to hide, if not hide the ellipsis "..." before the text, it will click on the "View full text" button "..." does not disappear, so the article will not be able to read ~ ~ ~Second, the following to look at the style:*{ padding:
(); } }) })script>head>body> div class="Artfram"> div class="Artlist"> span>nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;span> span>A good program developer, in addition to mastering the professional development language, but also to havespan> span style="Display:none">Persistent, steady, meticulous professional qualityspan>nbsp;a href="javascript:void (0)">Showa>
the complicated pages are not, if we have a page with dozens of div on it, we need to click on the page somewhere else to hide the problem.The code we write with our ideas may be:It looks simple and still, but when we think about it, we'll find the problem, we've got a similar approach on every dialog, and maintaining so many click event handlers is absolutely overhead for memory, causing our pages to run
One of the most common requirements in web development is to click inside a div to do something, and click on the page to hide the div elsewhere. For example, many navigation menus, when the menu is expanded, will be asked to click on other non-menu areas of the page to hide the menu.Start with the simplest, if the pag
V-ifThe V-IF receives the bool type. True, the generated html,false is not generated. or remove the element directly.Examples include: Div v-if= "true" > Hello Div >V-elseV-else is immediately behind v-if or v-show, otherwise it will not be recognized.Examples include:v-if= "flase"> wrong div> v-else > not the wrong
Sometimes we need this effect: when the mouse is placed on the display of a div, when the mouse is removed when the div is hidden. The code below, remember to introduce the Jquyer library.jquery mouse to move up to show Div, the mouse left when the hidden div effect
Jquery special effects (1)-click to show and hide the full text, jquery Special Effects
Off duty ~~~ I posted a small jquery special effect that I have compiled today. I personally think it is relatively simple. I wrote the short answer ~~~
Next, let's look at the final dynamic effect:
1. Let's take a look at the main framework program:
In the above program layout, it should be noted that the content in
In jquery, I can directly use show () and hide () to display and hide elements. This is easier than the operations in js. At the same time, show () and hide () you can also set parameters so that our operation has a cache effect. I will introduce it to you later.
Basic usage
This article describes how to show and hide comments and reference Buttons over the mouse in WordPress. It is very practical to show and hide comments. For more information, see
Display, hide, reply, and reference Buttons over the mouseIdeas and principles
The principle is s
This article mainly introduces how to move the cursor to the div and Show Details on the floating layer. The code of the instance that overlaps the left margin of the top margin of the layer and the div is displayed. For more information, see:
The Code is as follows:
in JQuery, you can use the Hide () and show () methods to hide and show HTML elements, and use the toggle () method to toggle the Hide () and show () methods.Hide, show, toggle, swipe,
first, the use of jquery control div display and hide
Using jquery to control the display and concealment of a div can be done in a word, for example:
1.$ ("#id"). Show () is Display:block,
$ ("#id"). Hide () is expressed as display:none;
2.$ ("#id"). Toggle () Toggles the v
First from the simplest start, if the page has a DIV with ID test, we want to implement the click of the page to hide the div elsewhere:
Copy Code code as follows:
There are generally two ideas for this problem, both of which use the principle of event bubbling, to learn more about the JavaScript event mechanism to see the JavaScript a
Recently on the move end of the project, so much of the use of ' lightweight zepto.js, now the problem is, I need to show-hide a div, generally to determine whether this div is visible, then show or hide, test a page is visible or
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.