Coder Social home page Coder Social logo

harrysaini / swipe-fade-out Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.61 MB

A simple js library to swipe out html elements in mobile browers.

Home Page: https://harrysaini.github.io/swipe-fade-out/

JavaScript 100.00%
mobile-browers js-library html-element swipe

swipe-fade-out's Introduction

swipe-fade-out

A simple js library to swipe out html elements in mobile browers.

How to use

var swiper = new SwipeFadeOut('#element-div',options);
swiper.initListeners();

or

var swiper = new SwipeFadeOut(document.getElementById('element-div'),options);
swiper.initListeners();

Options

  {
  
  fadeOutThreshold : "percentage of swipe moved to fadeout div , DEFAULT = 40%",
  parentDiv : "element corresponding to which fadeOutThreshold is calculated DEFAULT = window",
  animationTime:"all fading and transitions animation time , DEFAULT = 500ms",
  opacityFadeScale:"How fast div fades away , VALUE=(0 to 2) , DEFAULT = 1.2 times percentage change in position",
  
  //callbacks
  afterSwipeOut:function(element){
                  //handle after div swipe outes
                }
  
  }

Still working on it !!!.

Please feel free to improve .

swipe-fade-out's People

Contributors

harrysaini avatar

Stargazers

 avatar  avatar

Watchers

 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.