Giter Site home page Giter Site logo

php-rock / jquery.simple-scroll-follow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sutara79/jquery.simple-scroll-follow

0.0 1.0 0.0 505 KB

jQuery plugin to move the element according to the scrolling window.

Home Page: https://sutara79.github.io/jquery.simple-scroll-follow/

JavaScript 48.69% HTML 51.31%

jquery.simple-scroll-follow's Introduction

jquery.simple-scroll-follow

Build Status Coverage Status dependencies Status

jQuery plugin to move the element according to the scrolling window.

Sample image

Demo

https://sutara79.github.io/jquery.simple-scroll-follow/

Install

  • GitHub: Clone or download.
  • npm: npm i jquery.simple-scroll-follow
  • CDN (jsDelivr):
    • jquery.simple-scroll-follow.min.js: v3.1.0

Usage

HTML
<div id="foo">Element to follow</div>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="jquery.simple-scroll-follow.min.js"></script>
CSS
body {
  background: url(null) fixed; /* for Google Chrome */
}

#foo {
  position: absolute;
}
JavaScript
$('#foo').simpleScrollFollow();

Option

name type default description
limit_elem Object, string $('body') Lower limit of target element.
min_width number 0 When windows width is less narrow than this, this plugin stops.
enabled boolean true If it is false, this plugin stops.
upper_side string null Upper side of target element.
lower_side string null Lower side of target element.

Public Method

(since v3.0.0)

.setEnabled()

Parameter
No. type default description
1 boolean true true: this plugin resumes.
false: this plugin stops.

Compatibility

License

MIT

Author

Yuusaku Miyazaki ( [email protected] )

jquery.simple-scroll-follow's People

Contributors

sutara79 avatar

Watchers

Jack Sheppard 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.