Giter Club home page Giter Club logo

ionicscroller's Introduction

ionicScroller

NPM

ionicScroller is an Angular.js and Ionic Framework extension for simple scroll-top, -bottom, -to functionality.

Installation

Usage

  • load ionic, ionic-scroller scripts in your index.html
  • add dependency to your app module var myAppModule = angular.module('ionicScrollerTest', ['ionic', 'ionicScroller']);
  • use directives in your html --> ion-scroller-top, ion-scroller-bottom, ion-scroller-to, ion-scroller-anchor
  • <ion-scroller-top css-class="button button-assertive" offset="20" text="UP!" scroll-delegate="delegateHandle" animate="true"></ion-scroller-top>
  • the generated buttons are hidden on shown with ng-show/ng-hide, so you can animate showing and hiding of the buttons through css as well ;)
  • add class with absolute position to move button over your list ;)

Configuration

ion-scroller-top and ion-scroller-bottom

  • change button text: text="YOUR TEXT OR EMPTY" (default: Top / Bottom)
  • animate scrolling: animate="true" (default false)
  • auto-hide at offset: offset="10" (ion-scroller-bottom: hides button if scroll position top >= offset, default: -1; ion-scroller-top: hides button if scroll position top <= offset, default: -1; offset="-1": does not hide the button)
  • connect to delegateHandle: scroll-delegate="delegateHandle" (default, the main delegateHandle like ion-content)
  • style through class or ng-class expression: css-class="button button-assertive" (wraps up in ng-class, default: 'button button-dark')

ion-scroller-to

  • change button text: text="YOUR TEXT OR EMPTY" (default: GoTo)
  • animate scrolling: animate="true" (default false)
  • left, top: left="10" top="50" (target scroll position, required)
  • connect to delegateHandle: scroll-delegate="delegateHandle" (default, the main delegateHandle like ion-content)
  • style through class or ng-class expression: css-class="button button-assertive" (wraps up in ng-class, default: 'button button-dark')

ion-scroller-anchor

  • change button text: text="YOUR TEXT OR EMPTY" (default: GoTo)
  • animate scrolling: animate="true" (default false)
  • anchor: anchor="domNodeId" (target node-id, required)
  • connect to delegateHandle: scroll-delegate="delegateHandle" (default, the main delegateHandle like ion-content)
  • style through class or ng-class expression: css-class="button button-assertive" (wraps up in ng-class, default: 'button button-dark')

Bitdeli Badge

ionicscroller's People

Contributors

bengtweisse avatar bitdeli-chef avatar killercodemonkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ionicscroller's Issues

Add test cases

add karma-runner and jasmine tests
--> connect to travis

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.