GithubHelp home page GithubHelp logo

isabella232 / ember-cli-scroll-to Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intercom/ember-cli-scroll-to

0.0 0.0 0.0 1.33 MB

{{link-to}} with animated #anchor power.

Home Page: https://buschtoens.github.io/ember-cli-scroll-to/

License: MIT License

JavaScript 67.56% HTML 19.52% CSS 12.93%

ember-cli-scroll-to's Introduction

ember-cli-scroll-to

ember install ember-cli-scroll-to

This addon allows you to target specific elements in your links again. Just like you could with anchors: <a href="/test#some-id">Link</a>.

{{#link-to 'some-route' (scroll-to '#some-css-selector')}}
  Go to #some-css-selector
{{/link-to}}

More detailed documentation will follow soon, but basically this is the API:

{{#link-to 'some-route' (scroll-to target duration padding)}}
  Go to #some-css-selector
{{/link-to}}

duration and padding are optional and fall back to the default values below.

If target is missing, the scroller will be reset upon clicking the link. This is useful when switiching between overflowing routes, as Ember does not reset the scroller automatically.

// config/environment.js

ENV['scroll-to'] = {
  duration: 700, // default value
  padding:    0  // default value
};

Collaborating

You're welcome to submit Pull Requests! Please commit all changes to a fresh branch with a descriptive name like fix-this-weird-bug-xx or feature-teleportation-machine-xx, where xx is the issue ID, if there is one.

Please squash unnecessary commits that were made during development and do not add any meaningful / important entries to the git log.

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

ember-cli-scroll-to's People

Contributors

buschtoens avatar ember-tomster avatar

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.