BosNaufal / vue-move-dom

Vue Directive to move the DOM without losing all the VM data, event, etc. it's Adopted from https://github.com/rhyzx/vue-transfer-dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue Move DOM

Vue Directive to move the DOM without losing all the VM data, event, etc. it's Adopted from vue-transfer-dom just Simplify it and change some writing behavior

DEMO

Install

Include the vue-move-dom.js to your HTML or web page file after Vue.Js.

Usage

<div id="app">

  <!-- Will move to body -->
  <button v-move-dom >The Button</button>

  <!--
    Will move to selected element
    the script will be `document.body.querySelector('#there')`
  -->
  <button v-move-dom="#there" >Move Button</button>

</div>
<div id="there"></div>

Thank You for Making this useful~

Hopefully this can be useful for your next projects.

Let's talk about some projects with me

Just Contact Me At:

License

MIT Copyright (c) 2016 - forever Naufal Rabbani

About

Vue Directive to move the DOM without losing all the VM data, event, etc. it's Adopted from https://github.com/rhyzx/vue-transfer-dom

License:MIT License


Languages

Language:JavaScript 100.0%