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

dom-modify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-modify

Modify dom containers ( resize, reposition )

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dom-modify

Install

$ npm install dom-modify

Import

// ES6
import * as modify from 'dom-modify';

// CommonJS
let modify = require('dom-modify');

Usage

The moveable element requires an absolute or fixed position, and to be positioned by top and left offsets.

#test{
	.position:fixed;
	top:100px;
	left:50px;
}
//	Pass an element through as the first parameter (targetElement).
var element = document.getElementById('test');
modify(element);
//	Include a selector for the second parameter if you want the element to be repositioned when dragging a child.
//	Example: a div with a title bar.
modify(element, '.titlebar');

Keywords

FAQs

Package last updated on 03 Jun 2020

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