Questions tagged [scrollto]

jQuery.scrollTo is a plugin for scrolling elements and the window with jQuery animation, by Ariel Flesler.

  • Project on Github (includes documentation)
  • Plugin Releases
  • Gist on anchor navigation with jquery.scrollTo
  • Migration to jquery.scrollTo 2.0
751 questions
672
votes
31 answers

Scroll Automatically to the Bottom of the Page

I have a list of questions. When I click on the first question, it should automatically take me to a specific element at the bottom of the page. How can I do this with jQuery?
jat
  • 6,940
  • 3
  • 14
  • 10
234
votes
9 answers

jQuery Scroll to bottom of page/iframe

How do I use jquery to scroll right down to the bottom of an iframe or page?
Adam
  • 9,189
  • 15
  • 46
  • 62
193
votes
9 answers

How can I update window.location.hash without jumping the document?

I have a sliding panel set up on my website. When it finished animating, I set the hash like so function() { window.location.hash = id; } (this is a callback, and the id is assigned earlier). This works good, to allow the user to bookmark the…
alex
  • 479,566
  • 201
  • 878
  • 984
135
votes
11 answers

How can I scroll to a specific location on the page using jquery?

Is it possible to scroll to a specific location on the page using jQuery? Does the location I want to scroll to have to have: here Or can it just move to a specific DOM id?
mrblah
  • 99,669
  • 140
  • 310
  • 420
102
votes
6 answers

How to scroll the window using JQuery $.scrollTo() function

I'm trying to scroll down 100px every time the user gets near the top of the document. I have the function executing when the user gets close to the top of the document, but the .scrollTo function isn't working. I put an alert after and before to…
Matt Doak
98
votes
14 answers

Trigger event when user scroll to specific element - with jQuery

I have an h1 that is far down a page..

TRIGGER EVENT WHEN SCROLLED TO.

and I want to trigger an alert when the user scrolls to the h1, or has it in it's browser's view. $('#scroll-to').scroll(function() { alert('you…
corepress
  • 1,085
  • 1
  • 9
  • 13
62
votes
9 answers

When form is validated, how to SCROLL to the first error instead of jumping?

I've seen many questions with variations on this theme, but I'm looking for the straightforward solution: HTML form, jQuery validation, multiple fields are required. When the form is submitted, validation jumps to the first error and highlights it.…
Heraldmonkey
  • 2,111
  • 2
  • 19
  • 29
45
votes
3 answers

Checking visibility of an element

I want to check if an element is visible and if yes, I want to scroll down to it. I am trying to achieve that with the following jquery: var j = jQuery.noConflict(); jQuery(document).ready(function($) { if(j('#element').css('display') ==…
user2539007
  • 453
  • 1
  • 4
  • 4
34
votes
2 answers

scrollTo speed/duration setting

Is there a way to speed up the behavior speed of scrollTo? I had a stab in the dark at speed and duration but don't work! window.scrollTo({ top: 1000, behavior:…
GoldenGonaz
  • 1,116
  • 2
  • 17
  • 42
31
votes
11 answers

iPad Flicker on auto scroll using JQuery and Scrollto plugin

I am having a bit of a weird problem with iOS platform for a page i am developing. This is the page in question. When clicking any of the case study images, the page will first unhide the required case study then scroll to it. This works on all…
Shadi Almosri
  • 11,678
  • 16
  • 58
  • 80
27
votes
3 answers

scrollTo function jQuery is not working

I need Jquery's scrollTo function to work for this website: http://cinicraft.com/Silverman/index.html I've tried the following $(document).ready(function() { $("div.btnLp3").click(function(){ $('body,html').scrollTo('#target-examples',…
Matt Andrzejczuk
  • 2,001
  • 9
  • 36
  • 51
17
votes
9 answers

ScrollTo with animation

how can i add an easing/animation/slowly moving to this function? At the moment it just jumps. Now it should move to the "anchor" with an animation.
Max
  • 608
  • 1
  • 7
  • 23
17
votes
4 answers

Scroll to the center of viewport

I would like to center a div by clicking it. So if I'm clicking a div I want it to scroll to the center of the browser viewport. I don't want to use anchor points like the guides and examples I've seen. How can I achieve this?
Designon
  • 183
  • 1
  • 1
  • 8
16
votes
6 answers

Bootstrap collapse - go to top of the open item?

I'm using the bootstrap collapse function, but when I open an element which has a lot of content, then open the next element, it jumps down and doesn't go to the top of the open element. I've tried using scrollto plugin as shown below but it doesn't…
user1937021
  • 10,151
  • 22
  • 81
  • 143
15
votes
3 answers

jQuery: move window viewport to show freshly toggled element

I have a snippet of jQuery in doc ready which toggles a div containing a textarea: $('div#addnote-area').hide(); // hide the div $('a#addnote-link').click(function() { // click event listener on link $('div#addnote-area').toggle(); // toggle…
k00k
  • 17,314
  • 13
  • 59
  • 86
1
2 3
50 51