# jQuery.ScrollTo by Ariel Flesler

### Links

- Project Page
- Main blog article
- All articles
- LocalScroll Demo
- SerialScroll Demo
- Old Demo

### Ways to specify the target Click an option, to see it in action

- Relative selector
- jQuery object
- DOM Element
- Absolute number
- Absolute number(hash)

- Absolute position
- Absolute position(hash)
- Relative position
- Relative position(hash)
- Percentage

- 0

  go back

- 1

  go back

- 2

  go back

- 3

  go back

- 4

  go back

- 5

  go back

- 6

  go back

- 7

  go back

- 8

  go back

- 9

  go back

- 10

  go back

- 11

  go back

- 12

  go back

- 13

  go back

- 14

  go back

- 15

  go back

- 16

  go back

- 17

  go back

- 18

  go back

- 19

  go back

- 20

  go back

- 21

  go back

- 22

  go back

- 23

  go back

- 24

  go back

- 25

  go back

- 26

  go back

- 27

  go back

- 28

  go back

- 29

  go back

### Options The examples shown here, are summarized for brevity, check the source for real code

- no options
- axis
- duration
- easing
- margin
- offset
- offset(hash)
- offset(function)
- over
- over(hash)
- queue
- onAfter
- onAfterFirst

- 0

  go back

- 1

  go back

- 2

  go back

- 3

  go back

- 4

  go back

- 5

  go back

- 6

  go back

- 7

  go back

- 8

  go back

- 9

  go back

- 10

  go back

- 11

  go back

- 12

  go back

- 13

  go back

- 14

  go back

- 15

  go back

- 16

  go back

- 17

  go back

- 18

  go back

- 19

  go back

- 20

  go back

- 21

  go back

- 22

  go back

- 23

  go back

- 24

  go back

- 25

  go back

- 26

  go back

- 27

  go back

- 28

  go back

- 29

  go back

Note that when 'queue' is true, choosing 'axis' as 'xy' or 'yx' matters

Don't use a hash for the target to scroll only one axis, use the option 'axis' instead. The hash is used to scroll both axes with different positions.