博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jquery scroll_jQuery scroll()
阅读量:2531 次
发布时间:2019-05-11

本文共 1567 字,大约阅读时间需要 5 分钟。

jquery scroll

jQuery scroll() function triggers when the element is scrolled. This method attaches a handler, which executes when the scroll event is fired. A scroll event fires for all elements which are scrollable and it also fires for window objects.

jQuery scroll()函数在元素滚动时触发。 此方法附加一个处理程序,该处理程序在滚动事件触发时执行。 对于所有可滚动的元素,将触发滚动事件;对于窗口对象,也将触发滚动事件。

jQuery scroll() (jQuery scroll())

The syntax for using jQuery scroll() function is:

使用jQuery scroll()函数的语法为:

  • scroll()

    滚动()

This signature is used without any arguments. This method is a shortcut for .trigger( "scroll" ).

该签名不带任何参数。 此方法是.trigger( "scroll" )的快捷方式。

  • scroll(handler)

    滚动(处理)

The handler is a function, which is executed when the element gets scrolled. This method is a shortcut for .on( "scroll", handler ).

处理程序是一个函数,当元素滚动时执行。 该方法是.on( "scroll", handler )的快捷方式。

jQuery滚动示例 (jQuery scroll example)

Following example demonstrates jQuery scroll() function usage.

以下示例演示了jQuery scroll()函数的用法。

jQuery Scroll

Scroll Event Demo

Paragraph one Paragraph two Paragraph three Paragraph four Paragraph five Paragraph six Paragraph seven

Scroll event triggered 0 times.

In this example, you can see that the scroll() method is triggered when you scroll in the <div> element. The handler attached to the scroll() method executes with each scroll event displays the count below the <div> element.

在此示例中,您可以看到在滚动<div>元素时触发了scroll()方法。 附加到scroll()方法的处理程序在每个滚动事件显示时在<div>元素下方显示计数。

jQuery滚动演示 (jQuery scroll demo)

You can try it yourself by scrolling in the below div section.

您可以滚动以下div部分来自己尝试。

翻译自:

jquery scroll

转载地址:http://ldlzd.baihongyu.com/

你可能感兴趣的文章
LINQ巩固
查看>>
观看杨老师(杨旭)Asp.Net Core MVC入门教程记录
查看>>
UIDynamic(物理仿真)
查看>>
Windows下安装Redis
查看>>
迷宫实现
查看>>
【字符编码】Java字符编码详细解答及问题探讨
查看>>
学习操作系统导图
查看>>
在线的JSON formate工具
查看>>
winform非常实用的程序退出方法!!!!!(转自博客园)
查看>>
xml解析
查看>>
centos安装vim
查看>>
linux工作调度(计划任务)
查看>>
hdu--1698 Just a Hook(线段树+区间更新+懒惰标记)
查看>>
Python学习笔记-EXCEL操作
查看>>
二月二——头牙诗词
查看>>
《吴忠与富平》之四:汉三水属国(北地属国、安定属国)
查看>>
丁酉立秋喜逢风雨
查看>>
vim删除#开头的行和正则表达式笔记
查看>>
python3 提成计算
查看>>
VBA赋值给指定单元格
查看>>