Socket
Socket
Sign inDemoInstall

@wulechuan/dom-stick-on-both-edges

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @wulechuan/dom-stick-on-both-edges

Hang a dom to window top (with customizable offset of course) or stick it down to somewhere of the page so that it moves with the page when the page is scrolling.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
130 kB
Created
Weekly downloads
 

Readme

Source

javascript-web-dom-stick-on-both-edges

Introduction

npmjs: @wulechuan/dom-stick-on-both-edges https://www.npmjs.com/package/@wulechuan/dom-stick-on-both-edges

Hang a dom to window top (with customizable offset of course) or stick it down to somewhere of the page so that it moves with the page when the page is scrolling.

Requirements

jQuery.throttle is required to run this module;

See: http://benalman.com/projects/jquery-throttle-debounce-plugin/

And: https://github.com/cowboy/jquery-throttle-debounce

Usage

var instance = new window.StickOnBothEdges({
    rootElement: document.querySelector('.hanging-block-wrapper'),
    hangingBlockElement: document.querySelector('.hanging-block'),
    lowerBoundaryRefElement: document.querySelector('.chief-content'),
    contentBottomToLowerBoundaryInHangingLayouts: 0,
    shouldEnableOnInit: true
});

API

Coming soon.

Keywords

FAQs

Last updated on 15 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc