All Projects → maael → html-chain

maael / html-chain

Licence: MIT license
🔗 A super small javascript library to make html by chaining javascript functions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to html-chain

Stardust
🎨Tiller Design System
Stars: ✭ 19 (-40.62%)
Mutual labels:  javascript-library
animate
PixiJS runtime library for content from Adobe Animate CC
Stars: ✭ 142 (+343.75%)
Mutual labels:  javascript-library
staballoy
Reactive UI framework for Titanium Alloy
Stars: ✭ 18 (-43.75%)
Mutual labels:  javascript-library
rottenjs
An all-in-one (2.6kb) Javascript library for web development
Stars: ✭ 15 (-53.12%)
Mutual labels:  javascript-library
example-typescript-package
Example TypeScript Package ready to be published on npm & Tutorial / Instruction / Workflow for 2021
Stars: ✭ 71 (+121.88%)
Mutual labels:  javascript-library
costa-rica-iban
Funciones utiles para extraer y validar información general de números de cuenta IBAN de Costa Rica
Stars: ✭ 16 (-50%)
Mutual labels:  javascript-library
banana-i18n
banana-i18n - Javascript Internationalization library
Stars: ✭ 61 (+90.63%)
Mutual labels:  javascript-library
puddle.js
An ASCII/Node based fluid simulation library.
Stars: ✭ 102 (+218.75%)
Mutual labels:  javascript-library
constant-time-js
Constant-time JavaScript functions
Stars: ✭ 43 (+34.38%)
Mutual labels:  javascript-library
html-to-react
A lightweight library that converts raw HTML to a React DOM structure.
Stars: ✭ 696 (+2075%)
Mutual labels:  javascript-library
resizerjs
Simple resizing for flexbox
Stars: ✭ 16 (-50%)
Mutual labels:  javascript-library
rutils
ruitls.js 涵盖了前端开发常用的工具方法,有字符串、数字、数组、缓存、文件等,尽可能的避免前端在开发中重复造轮子
Stars: ✭ 14 (-56.25%)
Mutual labels:  javascript-library
node-banner
Easily integrate ASCII flavored banners to your CLI tool
Stars: ✭ 18 (-43.75%)
Mutual labels:  javascript-library
react-circle-flags
🚀 A React component with a collection of 300+ minimal circular SVG country flags. Wrapper of HatScripts/circle-flags
Stars: ✭ 29 (-9.37%)
Mutual labels:  javascript-library
iFrameX
Iframe generator with dynamic content injection like HTML, Javascript, CSS, etc. and two ways communication, parent <-> iframe.
Stars: ✭ 18 (-43.75%)
Mutual labels:  javascript-library
bee-js
Javascript client library for connecting to Bee decentralised storage
Stars: ✭ 50 (+56.25%)
Mutual labels:  javascript-library
menu-hamburger
🍔 A clean, simple and easy to use library to create a Menu Hamburger
Stars: ✭ 17 (-46.87%)
Mutual labels:  javascript-library
animusjs
🎆 AnimusJS is the solution for combine JS and CSS animations.
Stars: ✭ 42 (+31.25%)
Mutual labels:  javascript-library
Amino.JS
A powerful JavaScript library for interacting with the Amino API 🌟
Stars: ✭ 25 (-21.87%)
Mutual labels:  javascript-library
xGallerify
A lightweight, responsive, smart gallery based on jQuery
Stars: ✭ 52 (+62.5%)
Mutual labels:  javascript-library

html-chain

NPM Version Build Status Code Climate

A super small (only 3.1kB) javascript library to make html by chaining javascript functions.

Example

var test = html()
    .add('div', {className: 'container', data: { info: 'extraInformation' }})
        .contains('div', {className: 'header'})
            .contains('h5', {className: 'headerTitle', text: 'This is a header'}).end()
        .and('div', {className: 'content'})
            .contains('p', {text: 'This is the content'}).end()
        .end()
    .build();

Produces -

<div class="container" data-info="extraInformation">
    <div class="header">
        <h5 class="headerTitle">This is a header</h5>
    </div>
    <div class="content">
        <p>This is the content</p>
    </div>
</div>

Installation

Node.js

Run npm install --save html-chain You can then access it with var html = require('html-chain');

Script

Download and include the html.js script in your html.

<script type="text/javascript" src="_PATH_TO_html.js_"></script>

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].