Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-scroll

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scroll

scroll directive for vuejs

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
decreased by-6.59%
Maintainers
1
Weekly downloads
 
Created
Source

vue-scroll

scroll directive for vuejs 2.0

For vue 1.x, please use vue-scroll@1.0.4 or higher version. Currently its code is in master branch.

NPM

Installation

NPM(recommended)

npm install vue-scroll --save

Standlone

Simple download and include it in script tag.

Usage

It's very simple, just declar in html tags and provide a defined callback - the scroll function below.

In javasript:

new Vue({
  el: '#app',
  data: {},
  methods:{
    onScroll:function(e, position){
      this.position = position;
    }
  }
})

The function onScroll has two arguments, e is the scroll event object, position is an object which has two properties about the postion of scroll bar:

  • scrollTop type:number
  • scrollLeft type:number

In html:

<body v-scroll="onScroll">
...
</body>

Samples

LICENSE

MIT

Keywords

FAQs

Package last updated on 02 Dec 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc