New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

g-scroll

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-scroll - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "g-scroll",
"version": "1.0.0",
"version": "1.0.1",
"description": "GScroll is a lightweight javascript tool to trigger a function when you scroll to a DOM.",

@@ -5,0 +5,0 @@ "main": "lib/g-scroll.js",

# GScroll
#####GScroll is a lightweight javascript tool to trigger a function when you scroll to a DOM.
##### GScroll is a lightweight javascript tool to trigger a function when you scroll to a DOM.
[Live demo](https://ga-mo.github.io/g-scroll/demo/)

@@ -18,1 +18,43 @@

You can [download the source](https://github.com/GA-MO/g-scroll/tree/master/lib) as well. :)
#### Properties:
```js
selector: '.element', // Class name for trigger
offset: 10, // Offset point for trigger
delay: 0.5, // Time delay before call action
action: function(selector) {
// this function will trigger when DOM in viewpoit
// (selector) is current DOM in viewpoit
// can use (selector) make a great thing with your favorite lib.
}
```
#### Example:
```js
// Set up properties
var dataScroll = [
{
selector: '.element1',
offset: 10,
delay: 0.5,
action: function(selector) {
TweenMax.from(selector, 0.3, { y:100, opacity: 0 });
}
},
{
selector: '.element2',
offset: 10,
delay: 0.5,
action: function(selector) {
alert('Trigger me');
$(selector).addClass('animated');
}
}
];
// Use
GScroll(dataScroll);
```

Sorry, the diff of this file is not supported yet

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