Document manupulation using vanila javascript
npm install dom-mizingDocument manupulation using vanila javascript.
Install DOM Mizing to your project.
``bash`
pnpm install dom-mizing
Import statement DOM Mizing
`ts`
import DomMiz form "dom-mizing";
#### Select A Element Using Class
`ts`
const $box = new DomMiz(".box");
#### Select A Element Using Id
`ts`
const $box = new DomMiz("#box");
#### Create Element
`ts`
const $box = DomMiz.create("box");
#### Create Text
`ts`
const $name = DomMiz.createTxt("hello");
#### Set Attribute
`ts`
$body.attr("hello", "world");
#### Set Multiple Attributes
`ts`
$body.attr({ id: "001" });
#### Get Attribute Value
`ts`
$body.attr("hello");
#### Set Style
`ts`
$body.attr("width", "10rem");
#### Set Multiple Styles
`ts`
$body.attr({ height: "15rem" });
#### Get Style Value
`ts`
$body.attr("width");
`ts`
$body.show();
`ts`
$body.hide();
`ts`
const $button = DomMiz.create("button");
$button.on("click", () => console.log("Clicked"));
`ts`
$box.parent();
`ts`
$box.remove();
`ts`
const $container = DomMiz.create("div");
$box.replace($container);
#### Add A Children
`ts`
$body.child([document.createElement("div")]);
#### Add Multipe Childrens
`ts`
$body.child([DomMiz.create("div"), $box]);
#### Get Childrens
`ts`
$body.child();
#### Get HTML
`ts`
$body.html();
#### Set HTML
`ts`
$body.html("Hello
");
#### Get Text
`ts`
$body.txt();
#### Set Text
`ts``
$body.txt("Hello");