Coder Social home page Coder Social logo

dricardo1 / pull-and-zoom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sandropaganotti-zz/pull-and-zoom

1.0 1.0 0.0 227 KB

pullAndZoom.js is a library that zoom the header while an user pull the body of a mobile page

License: MIT License

pull-and-zoom's Introduction

Pull and Zoom

pullAndZoom.js is a library that zoom the header while pulling a scrollable div, it mimic the behaviour of the profile card of the iOs native Twitter app. A small gif is worth a thousand words:

Chrome on Android

Demo on Android Chrome

Safari on iOs7

Demo on iPhone

Getting Started

The library requires iScroll to work properly on Chrome; on iOs it uses the native scroll. If the browser is not supported everything degrades gracefully to a standard scroll.

To use this library you need to initialize it as follow:

window.addEventListener('load',function(){
  new pullAndZoom({
    // the wrapper of the scrolling area
    mainPage: document.getElementById('mainpage'),
    // the wrapper of the zooming area
    backgroundImage: document.getElementById('background_image')
  }).ping();
});

Please refer to demo.html and demo.css in this repository for an example of the HTML and CSS structure required by this library.

Working Demo

A working demo is available here: pullAndZoom working demo, you can also use this short URL: bit.ly/tws-demo

pull-and-zoom's People

Contributors

sandropaganotti avatar

Stargazers

Donar Development avatar

Watchers

Donar Development 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.