Coder Social home page Coder Social logo

gregstewart / swipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torkiljohnsen/swipe

1.0 1.0 0.0 156 KB

jQuery plugin that adds mobile touch swipe event handling, and allows for vertical scrolling.

Home Page: http://torkiljohnsen.com/demo/layered-mobile-nav/

JavaScript 100.00%

swipe's Introduction

Port of Swipeable jQuery plugin to Zepto

An attempt at an implementation the layered approach mobile navigation pattern that can be seen in for instance the Path app. Swipeable is for use on responsive websites, so unlike a native app it has (or rather, will have) fallbacks for non-touch and non-JS devices.

Background

On smaller devices, screen real estate is hard to come by. Navigation often gets in the way of content. With Swipeable, I'm trying to move the navigation out of the way, while still letting it be easily accessible. I'm doing this by implementing a navigation that's progressively enhanced:

1. Basic functionality

When no touch or Javascript support is available, navigation should follow the footer anchor pattern. This means that the navigation is placed in the bottom of the page, and that a button in the top of the page with an achor link, will take you to the navigation.

2. Enhance 1: With Javascript

If javascript support is detected, the navigation layer should be placed on a lower z-index than the main content, and placed below it, while the "extra" layer (contact info for instance), should be put on an even lower z-index and underneath as well. This will allow you to click the "MENU" button to slide the main content right to reveal the main menu, and click the button "CONTACT" to slide the content and menu to the left to reveal the contact info layer.

3. Enhance 2: With touch

If the device supports touch, then touch support is added so that revealing the menu or the contact info can be done by swiping right and left.

Testdrive

Check out the JQuery demo (use a small touchscreen, this is not responsive just yet)

Check out the Zepto demo (use a small touchscreen, this is not responsive just yet)

swipe's People

Contributors

torkiljohnsen avatar gregstewart avatar sgentile avatar

Stargazers

 avatar

Watchers

James Cloos 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.