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

bradpitt

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bradpitt

Set of javascript modules that do cool stuff

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-93.75%
Maintainers
1
Weekly downloads
 
Created
Source

Bradpitt.js

nothing in demo yet ;)

This is a javascript snippet library for animating and interacting with the DOM. Most of these are modules I use in my projects everyday and simply wanted to share them for anyone else that's interested in contributing fun reusable code.

npm

Install BradPitt, and add it to your package.json dependencies.

$ npm i bradpitt --save

Lazy Add Classes

import {lazy} from 'bradpitt'

Lazy Adding classes

Usage
let oscar = doucment.querySelector('.award')

let oscars = doucment.querySelectorAll('.awards')

lazy(oscar, 'won', 600)

lazy(oscars, 'nominated', 900)

Vanillia JS Parallax

[https://labs.redantler.com/vanilla-js-parallax-without-the-bloat-fd1f357914e7#.3xpjqrc2e](Optional Reading) that explains the technique.

import {swimming} from 'bradpitt'

Current implementation is on the dom, this may change to being JS focused but for now set up the elements you want on the page as follows:

<div class="bradpitt" data-speed="4">
  <img src="http://placehold.it/350x150">
</div>
<div class="bradpitt" data-speed="10">
  <img src="http://placehold.it/350x150">
</div>
let parallax = swimming('.bradpitt');
parallax.init();

optional recommended css:

transition: all 0.25s ease-out;
transition-delay: 0s;

Feel free to grab the source and configure for your own needs, I've used this for vertical/side-to-side/rotating elements on various sites. This is the slim version I may extend it to handle more situations. The css positioning of elements initially has a large impact as well.


MIT License

Keywords

FAQs

Package last updated on 14 Sep 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