Discover scroll up down jquery example, include the articles, news, trends, analysis and practical advice about scroll up down jquery example on alibabacloud.com
Jquery. autocomplete plugin extends the scroll bar to load more
The autocomplete plug-in is used in the project, but the original functions of the plug-in cannot meet all project requirements. Therefore, the following functions are added:
1. paste text to automatically load data
2. scroll to the bottom to load more data.
3. associate with the page plug-in to upda
Jquery retrieves the scroll bar height
Get the height of the display area of the browser: $ (window). Height ();
Obtain the width of the display area of the browser: $ (window). Width ();
Get the document height on the page: $ (document). Height ();
Get the document width: $ (document). Width ();Obtain the vertical height of the scroll bar to the top: $ (docu
-borderClientHeight = height-borderOffsetWidth = widthOffsetHeight = heightThe following is the most common method for retrieving the entire page width (jquery framework is required ).Copy codeThe Code is as follows:$ (Document). width () $ (Document). height () Alert ($ (window). height (); // The height of the visible area of the current window in the browserAlert ($ (document). height (); // The height of the current window document in the browserA
Well, let's take a look at the real-time loading of images after using this plug-in:
Today, we accidentally found this on the bag web.Because the homepage of his website is very long and there are many pictures on the homepage. If this plug-in is not used, so when we open his homepage, it will take half a day before the progress bar of the website will end. This is becauseHe has too many pictures on the homepage. It takes a long time to load images, which occupies the network bandwidth. They use
Use jquery to implement the effect of Web scroll: javasscrolltop "parameter. The best way to do this is to set the Link (for example, # About) marked by the Rolling indicator on your webpage ). The "href" anchorage you set points to the link "# target", and the link will jump to the "target" of the webpage element on the webpage as its number. This means that it
Jquery left and right scroll focus graph banner image, move the cursor over the display top and bottom pagesSuitable for pages with relatively large width and heightDemoCopy codeThe Code is as follows: Copy codeThe Code is as follows:@ Charset "UTF-8 ";Img {border: 0px ;}. Bannerbox {width: 320px; height: 150px; overflow: hidden; margin: 0px auto ;}# Focus {width: 320px; height: 150px; clear: both; over
Loads new content dynamically as the drop-down scroll bar or mouse wheel scrolls to the bottom of the page.The background uses JSON to transfer data, and the example program only writes sample arrays. The data is also set to only two attributes, which need to be rewritten according to the actual application. page with UL Li as a container, each Li represents a column The waterfall flow effect of
This kind of demand seems to feel that it is not very reasonable, because the data more so pull down no matter from the human or machine operation are more painful.
No way because of the demand down, only according to demand operation. Find a lot of related controls on the internet feel a bit large, accounting for more resources. No way to spend half a day to make a semi-finished custom control, take out to share, if you have a master to see more guidance.
Requirements: Ajax scrolling
Example 8-scroll view (CAMERA)In the previous example, scrollview uses the shader processing, and some low-end machines or mobile devices may display abnormal results, ngui also provides us with another processing method, that is, moving the camera to achieve the same purpose. Next, this example shows you how to implem
Jquery retrieves the scroll bar height
Obtain the height of the display area of the browser:$ (Window). Height ();Obtain the width of the display area of the browser:
$ (Window). Width ();Get the document height of the page:$ (Document). Height ();Get the document width: $ (document). Width ();
Obtain the vertical height from the scroll bar to the top:
$ (Doc
Because of browser compatibility issues, it is quite painful to obtain these values using JavaScript. Fortunately, jquery provides simple, elegant, and compatible solutions.
Obtain the width and height of the browser and page document
CopyCodeThe Code is as follows: // obtain the height of the area displayed by the browser.
$ (Window). Height ();
// Obtain the width of the browser display area
$ (Window). Width ();
// Obtain the document heigh
= width-borderClientHeight = height-borderOffsetWidth = widthOffsetHeight = height
The following is the most common method for retrieving the entire page width (jquery framework is required ).Copy codeThe Code is as follows: $ (document). width () $ (Document). height ()
Alert ($ (window). height (); // The height of the visible area of the current window in the browserAlert ($ (document). height (); // The height of the current window document in t
One, get the scrollbar height and positionjquery Gets the height of the display area of the Navigator: $ (window). Height (); Gets the width of the browser display area: $ (window). width (); Gets the document height of the page: $ (documents). Height (); Gets the document width of the page: $ (documents). width (); Gets the vertical height of the scroll bar to the top: $ ( Document). ScrollTop () or $ (window). ScrollTop () Gets the vertical width of
Original address: http://www.jqcool.net/jquery-jscrollpane.htmlJScrollPane is a very flexible, cross-browser jQuery that maps the browser's default scrollbar or the scroll bars that appear when an element overflows to an HTML structure, making it easy to use CSS to define scrolling styles. Let's take a look at this powerful and flexible way to use JScrollPane. In
The scroll bar of the DIV and DIV controls the scrolling of the content. the scroll bar style of the DIV can be covered by the DIV layer. Rewrite the scroll bar style JQuery to calculate the length and position of the scroll bar. The Code is as follows:
Javascript
The Code
I checked some div effects to implement the scroll bar. I read a lot and most of them do not meet the requirements.
The requirements are as follows:
1. Fixed div size, but not fixed content size in div
2. When you move the mouse over the content, if the content is too large, a scroll bar appears and you can drag it to view it, while the content width remains unchanged. Otherwise, the
Because of browser compatibility issues, using JavaScript to get these values is a pretty painful process. Fortunately, jquery offers a simple, elegant, and compatible solution.
Get the width and height of the browser and page document
Copy Code code as follows:
Get the height of the browser display area
$ (window). Height ();
Get the width of the browser display area
$ (window). width ();
Get the document height of a page
JQuery scrolling effect with scroll bar (fixed version)Code (based on jquery):
The code is as follows
Copy Code
Side Bar with movevar Rollstart = $ ('. Feed-mail '),//when scrolling to this block begins to moveRollset = $ ('. Search,.weibo,.group,.feed-mail,.tags '); Move blocks before adding rollstartRollstart.before (' var offset = R
Recently in doing a project, the function has been implemented, suddenly the user asked the header is floating (because the content is displayed on the same page, when scrolling, do not see the column header). Since functionality has been implemented using jquery+ pure HTML, in order to change less can only use the jquery original ecological implementation scrolling.
HTML Header code:
Copy Code code
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.