Skip to content

cristiandouce/replace-with

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replaceWith

Document replaceWith component.

Installation

Install with component(1):

$ component install cristiandouce/replaceWith

Usage

  var view = require('myView');
  var replaceWith = require('replace-with');

  // Search in DOM for container and
  // replaces with view Element
  replaceWith('body .app-container', view.render());

API

replaceWith(selector, element)

Replaces selector match in DOM for element Element.

License

MIT

About

Document replaceWith component.

Resources

Stars

Watchers

Forks

Packages

No packages published