Giter Site home page Giter Site logo

lili's Introduction

Lili

Lili (pronounced lee-lee) is a javascript library that makes dom manipulation less tedious

It features many useful functions, such as select(), which is syntactic sugar for document.querySelector().

There is also the create() function, which will let you make an element, give it text, give it an id, append it to another element, and give it a class, all in one function!

Here's an example, let's create a paragraph, give it the text "Hello there", set it's id to greeting then append it to an element with the id "card"

Vanilla js

let el = document.createElement("p");
el.innerText = "Hello there";
el.setAttribute("id","greeting");
var card = document.getElementById("card");
el.appendChild("card")

Lili

create("p", "Hello there", "greeting", "card")

For documentation, see doc.md

If you'd like to see a working example of Lili, then check out the Lili todo app

How to use

Just put it in a script tag and put a defer tag.

Use either the lili.js from this page or use the cdn https://cdn.jsdelivr.net/gh/Falazi/Lili@main/lili.min.js

You should use a specific version, like this https://cdn.jsdelivr.net/gh/Falazi/[email protected]/lili.min.js

Currently when it is minfied it is 1.77KB

lili's People

Contributors

falazi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.