tabuna / domulus

Manipulation of DOM on stimulus js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Domulus

Manipulation of DOM on stimulus js

Installation

npm install -s ...

Usage

controller
import {Controller} from "stimulus"
import Domulus      from 'dumulus'

export default class extends Controller {

    static targets = ["source"];

    connect() {
        Domulus.connect(this);
    }

    disconnect() {
        Domulus.disconnect(this);
    }
html
<div data-controller="example">
 <input data-target="example.source" type="text" value="1">
  <div data-show="example.source != 1">
    <h1>Show text only value 1 or true </h1>
  </div>
</div>

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

The MIT License (MIT). Please see License File for more information.

About

Manipulation of DOM on stimulus js

License:MIT License


Languages

Language:JavaScript 100.0%