-
Notifications
You must be signed in to change notification settings - Fork 57
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 thex
axis on the web page inpx
. -
y
- The value of they
axis 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 px
Don'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()