When the page scrolls to a div, add a new class to the div through js.Then, when the page scrolls back to the div, remove the class added in the previous step.You can see the middle part of the dynamic graph, and the menu is suspended at the top of the page after scrolling down to a certain position.At the same time, on the other hand, when you move the page up, go to
On many photo websites, the 3D carousel image effect is used to realize the continuous rotating carousel, which is the most grand and beautiful.For such a tall 3D rotating broadcast map, it is not as complicated as imagined.When we build our own website, we can all create such an effect.JQUERY
The website often has such a function that users can click the corresponding color to adjust the color of the website.That is what we call the color matching function.Here's how to add the skin color matching function to the website.Section Add a jquery cache cookie plug-in jquery. cooki
There are many number tumbling effects on the website. You can count the specified number from 0 to increase the animation when the page scrolls.This digital animation can control the delay time and animation transition time of the animation.It relies on plug-ins to listen for rolling events.Here's how to realize the digital animation tumbling effect of this website.Step 1: Download the number of jqueries
JQUERY click the effect of repeated changes, which is often used to toggle () for the display and hiding of DIV.Can you click Add Class and then click Remove Class?JQUERY toggleClass() can achieve the effect you require.Click to add a class, and then click
Now many websites have the function that the number increases from zero to the specified number.The realization of this function is also discussed in the website building tutorial in front of the learning website forum.Normally, this function will be executed as soon as the web page is loaded. If the location is low, the change process will not be seen.Then we need to
The div touch top fixed suspension on the top of the browser is a certain section. When the browser is pulled to the position of this div, it will be automatically suspended and fixed on the top of the browser.Now let's introduce how to achieve the effect that div touch top is fixed and suspended on the top of the browser.Introduce JQUERY above the tag at the top of the code;For the introduction method, see: How to introduce JQ into web pages
Just take out the last element and use the===symbol to compare.Take out the last element and use the function end().Code example: $data_arr=[['name '=>' Apple '], ['name'=>'Banana'], ['name '=>
The jQuery scrolling event $(window). scroll() changes the height of the navigation bar. The height of the navigation menu of some websites changes with the page pull-down, and when the page is restored to the top, the height is restored.The effect is shown in the following figure: How can the height of the navigation bar change with the page dragging?This requires the use of jQu
When we develop websites, some single page websites will have the function of continuously displaying different information in cycles. Every few seconds, one display will be displayed. After a few seconds, it will disappear, and then another information will be displayed.How to do this function?This function is made through JQUERY's setTimeout () function.Code such as
Many websites now have digital displays. In order to make the effect look bigger, these numbers will be displayed and rolled to the specified number.The effect is shown in the following figure: the following describes how to make this dynamic digital roll count to the specified digital effect.Step 1: Download the JS file necessary for the digital roll count: shu.js
In some websites, the height of the navigation menu changes with the drop down of the page, and when the page is restored to the top, the height is restored again.The effect is shown in the following figure: How can the height of the navigation bar change with the page dragging?This requires the use of the jQuery scroll event $(window). scroll().Let's introduce the implementation method