Giter Club home page Giter Club logo

scroll-to's Introduction

#Scroll To an easy way to scroll to an anchor

See it in action.


##Installation You can install Scroll-To through bower by running the following command in terminal.

$ bower install Scroll-To

##HTML setup

You don't have to change how you setup your HTML at all. Simply set the href the same way you normally would. This means everything will still work even if JavaScript is disabled in the browser.

<a href="#anchorPoint" id="selectorID">Click Here</a>

##JQuery

The JQuery code is pretty straight forward as well.

$('#selectorID').scrollTo();

##Optional Parameters

  • offset - this allows you to offset the stop position plus or minus in pixels. The default is 0.
  • speed - controls the speed of the scrolling, and supports any viable Jquery animation speed (i.e. 'fast' or 5000). The default is 'slow'.
  • override - this will allow you to override the default anchor scroll to position. The default is null.
  • easing - if you include JQuery UI, you can use their easing equations like the following block of code.
$('#selector').scrollTo({
	easing: 'easeOutBounce'
});

###License

MIT http://rem.mit-license.org

scroll-to's People

Contributors

bretmorris avatar individual11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scroll-to's Issues

Option to deactivate hashtag in url (feature request)

Hi, this is a nice little plugin.

Would it be an idea to be able to deactivate the #selector in the url as an individual option?
I often find that on projects that it would be nice to choose what internal links are "visible" or conflict with other scripts on a page.

Could be that this is super simple and not needed as an extra option :)

Thanks

Different pages

Hi I really like your plugin. It works perfectly for anchor in the same page, but if I have to change page doesn't scroll anymore. Any suggestion? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.