Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>jQuery Scroll Plugin</strong></p> <p>since this is a question tagged with <strong>jquery</strong> i have to say, that this library has a very nice plugin for smooth scrolling, you can find it here: <a href="http://plugins.jquery.com/scrollTo/" rel="noreferrer">http://plugins.jquery.com/scrollTo/</a></p> <p>Excerpts from Documentation:</p> <pre><code>$('div.pane').scrollTo(...);//all divs w/class pane </code></pre> <p>or </p> <pre><code>$.scrollTo(...);//the plugin will take care of this </code></pre> <p><strong>Custom jQuery function for scrolling</strong></p> <p>you can use a very <strong>lightweight approach</strong> by defining your custom scroll jquery function</p> <pre><code>$.fn.scrollView = function () { return this.each(function () { $('html, body').animate({ scrollTop: $(this).offset().top }, 1000); }); } </code></pre> <p>and use it like:</p> <pre><code>$('#your-div').scrollView(); </code></pre> <p><strong>Scroll to a page coordinates</strong></p> <p>Animate <code>html</code> and <code>body</code> elements with <code>scrollTop</code> or <code>scrollLeft</code> attributes</p> <pre><code>$('html, body').animate({ scrollTop: 0, scrollLeft: 300 }, 1000); </code></pre> <p><strong>Plain javascript</strong></p> <p>scrolling with <code>window.scroll</code></p> <pre><code>window.scroll(horizontalOffset, verticalOffset); </code></pre> <p>only to sum up, use the window.location.hash to jump to element with ID</p> <pre><code>window.location.hash = '#your-page-element'; </code></pre> <p><strong>Directly in HTML (accesibility enhancements)</strong></p> <pre><code>&lt;a href="#your-page-element"&gt;Jump to ID&lt;/a&gt; &lt;div id="your-page-element"&gt; will jump here &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload