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

positions

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

positions

A small, dependency free dom element positioning lib inspired by jquery-ui/position

  • 1.5.1
  • Source
  • npm
  • Socket score

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

positions

A small dom element positioning lib inspired by jquery-ui/position

installation

npm install positions

features

  • no dependencies
  • simple functional api
  • well tested in ie9+
  • tiny (871 B)

usage

var positions = require('positions')
// positions els 'top left' at targets 'top left'
var css = positions(el, 'top left', target, 'top left')
top-left-top-left
// positions els 'center center' at targets 'center center'
var css = positions(el, 'center center', target, 'center center')
center-center-center-center
// positions els bottom left at targets top left
var css = positions(el, 'bottom left', target, 'top left')
bottom-left-top-left
// positions els bottom center at targets bottom center
var css = positions(el, 'bottom center', target, 'bottom center')
bottom-center-bottom-center

...etc.

run tests

npm test

browser compatibility

works in all good browsers! (also in ie9+)

FAQs

Package last updated on 06 Apr 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