1.1.0 • Published 4 years ago

appendjs v1.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

##Installing Using npm:

$ npm install axios

Example

<div id="pageContainer"></div>
<script>
var pageContainer = append('#pageContainer', {
            name: 'div',
            attributes: {
                'class': 'ui segment'
            },
            style: {
                'backgroundColor': 'red',
                'height': '10vh',
                'width': '100%',
                'color': 'white',
                border: 'dotted white 1px'
            },
            on:{
                'click': function() {
                    console.log('clicked');
                },
                'dbclick': function () {
                    console.log('dbclicked');
                },
                'mouseover': function() {
                    console.log('mouse Over');
                }
            },
            childs: [
                {
                    name: 'h2',
                    id: 'mainUiSeg',
                    attributes: {
                        class: 'ui header',
                    },
                    innerHTML: 'Segment Header',
                    style: {
                        color: 'white'
                    }
                },
                {
                    name: 'div',
                    attributes: {
                        class: "content"
                    },
                    childs: [
                        {
                            name: 'home-page-dashbord'
                        }
                    ]
                    
                }
            ]
        });
        
        
        var btn = append(pageContainer, {
            name: 'button',
            attributes: {
                'class': 'ui button'
            },
            on: {
                click: function() {
                    alert('Button clicked');
                }
            },
            innerHTML: 'Click Me'
        });
</script>