This repository was archived by the owner on Jun 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Scroll API
Arthur Guiot edited this page Jul 25, 2017
·
1 revision
This function will accept 1 argument:
-
callback- The function that will be called each time you scroll.
JS:
$.scroll(function() {
console.log("Scrolling");
});This function will accept 2 arguments:
-
x- The value of thexaxis on the web page inpx. -
y- The value of theyaxis on the web page inpx.
JS:
$.on($.s(document.body), "click", function() {
$.scrollTo(100, 100) // will go to 100px, 100px
});This function will accept 1 argument:
-
el(optional) - The element you want to know the distance to its top. By default it refers todocument.body
This function will return you a value in px
JS:
$.scrollTop() // some value in pxDon't hesitate to ask your questions
- Home
- The Core Languages
- Getting Started: Installation
- The Basics (
$.var()+$.target()) - Developing for DisplayJS
-
$.select()- Text related
- If...else
$.xss()$.repeat()$.custom()$.live()$.load()$.on()$.onEvent()$.ready()- Scroll API
$.all()$.clone()$.is()$.valEmpty()$.remove()$.show()&$.hide()$.ajax()- Class Related
$.css()$.getStyle()- Fade effects
$.extend()$.dynamic()$.parent()- Elements-Nodes
$.component()$.time_ago()$.copy()$.then()$.sleep()$.getProp()