All Projects → germancutraro → Mei.js

germancutraro / Mei.js

Licence: MIT license
a minimal, simple and helpful library for you

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Mei.js

php-dom-wrapper
Simple DOM wrapper library to manipulate and traverse HTML documents similar to jQuery
Stars: ✭ 103 (+586.67%)
Mutual labels:  dom, manipulation
rottenjs
An all-in-one (2.6kb) Javascript library for web development
Stars: ✭ 15 (+0%)
Mutual labels:  dom, javascript-library
tsdom
Fast, lightweight TypeScript DOM manipulation utility
Stars: ✭ 16 (+6.67%)
Mutual labels:  dom, manipulation
Mag.js
MagJS - Modular Application Glue
Stars: ✭ 157 (+946.67%)
Mutual labels:  dom, javascript-library
Waff Query
Lightweight DOM manager
Stars: ✭ 9 (-40%)
Mutual labels:  dom, javascript-library
Hyperhtml
A Fast & Light Virtual DOM Alternative
Stars: ✭ 2,872 (+19046.67%)
Mutual labels:  dom, manipulation
picoCSS
picoCSS - really small JavaScript Framework
Stars: ✭ 62 (+313.33%)
Mutual labels:  dom, javascript-library
Rye
A modern, lightweight browser library using ES5 natives
Stars: ✭ 271 (+1706.67%)
Mutual labels:  dom, manipulation
Dom7
Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
Stars: ✭ 119 (+693.33%)
Mutual labels:  dom, javascript-library
necktie
Necktie – a simple DOM binding tool
Stars: ✭ 43 (+186.67%)
Mutual labels:  dom, javascript-library
party-js
A JavaScript library to brighten up your user's site experience with visual effects!
Stars: ✭ 858 (+5620%)
Mutual labels:  javascript-library
w-components
JavaScript library based on Web Components.
Stars: ✭ 17 (+13.33%)
Mutual labels:  javascript-library
PopUpOFF
Chrome extension, providing better web experience.
Stars: ✭ 65 (+333.33%)
Mutual labels:  dom
animeflv
Animeflv is a custom API that has the entire catalog of the animeflv.net website. You can enjoy all the content with subtitles in Spanish and the latest in the world of anime for free.
Stars: ✭ 37 (+146.67%)
Mutual labels:  javascript-library
moon
🌎 🌔 A hobby web browser developed from scratch
Stars: ✭ 253 (+1586.67%)
Mutual labels:  dom
vue-drag-select
基于Vue的仿原生操作系统鼠标拖拽选择
Stars: ✭ 63 (+320%)
Mutual labels:  dom
smart-custom-element
Smart a lightweight web component library that provides capabilities for web components, such as data binding, using es6 native class inheritance. This library is focused for providing the developer the ability to write robust and native web components without the need of dependencies and an overhead of a framework.
Stars: ✭ 17 (+13.33%)
Mutual labels:  dom
shikijs
A JavaScript Library for Syntax Highlighting with Awesome themes
Stars: ✭ 21 (+40%)
Mutual labels:  javascript-library
save-html-as-image
Download the HTML (DOM) to Image (JPG, PNG)
Stars: ✭ 26 (+73.33%)
Mutual labels:  dom
FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Stars: ✭ 37 (+146.67%)
Mutual labels:  javascript-library

Mei.js

a minimal, simple and helpful library for you

Star the project

With your star in the project, you help us to make ourselves known and the project to continue. Thank you very much!

Documentation

You can also find the documentation on the website.

DOM Manipulation:

Get Elements:

  <h1 id="title">Mei.Js</h1>
  <ul id="list-container">
    <li class="item">Item-1</li>
    <li class="item">Item-2</li>
    <li class="item">Item-3</li>
  </ul>
 // Return, if exist, the element, if not return null
 let element = Mei.getElement('#title');
 // Return an array of all selected elements
 let elements = Mei.getElements('.item'); 

Events:

Set Events:

  <h1 id="title">Mei.Js</h1>
  <ul id="list-container">
    <li class="item">Item-1</li>
    <li class="item">Item-2</li>
    <li class="item">Item-3</li>
  </ul>
 // Event for the h1 
 Mei.getElement('#title', 'click', () => {
   console.log('#title clicked!');
 });

 // This is not so recommended, use event delegation instead.
 Mei.getElements('.item', 'click', () => {
   console.log('item clicked!');
 });

Elements:

Creation:

  <div id="container">

  </div>
  <ul id="list">

  </ul>
 // This will create a 'h1'
 Mei.createElement('h1', {
   textContent: 'Hello World!',
   className: 'title',
   id: 'title-js',
   parent: Mei.getElement('#container')
 });

 // Create Children's
 Mei.createElement('li', {
   textContent: 'Item',
   className: 'item',
   parent: Mei.getElement('#list'),
   children: [
     {element: 'a', textContent: ' x', href: '#'}
   ]
 });

Removing:

  <h1 id="title">Title</h1>
 // This will remove the 'h1'
 Mei.removeElement(Mei.getElement('#title'));

Cloning:

  <h1 id="title">Title 1</h1>
 // Cloning the 'h1'
 let copiedH1 = Mei.cloneElement(Mei.getElement('#title'));
 // output
 console.log(copiedH1);

Storage: Work with the API storage in a more easy way

Save data:

 
  let users = [{name: 'John'}, {name: 'Nick'}];
  // This will create a 'users' item/collection in a localStorage way.      
  Mei.store({
    store: 'local',
    item: 'users',
    data: users
  });

  // This will create a 'users' item/collection in a sessionStorage way.
  Mei.store({
    store: 'session',
    item: 'users',
    data: users
   });

Clear all the stored data:

  // This will delete all the localStorage data     
  Mei.clearStore('local');

  // This will delete all the sessionStorage data  
  Mei.clearStore('session');

Remove a specified item from the store:

  // This will delete only the 'users' item (if exist) from localStorage     
  Mei.removeItemStore('local', 'users');

  // This will delete only the 'users' item (if exist) from sessionStorage     
  Mei.removeItemStore('session', 'users');

Get all the records, if is empty returns a empty array:

  // This will display the 'users' item (if exist) from localStorage     
  let allUsersFromLocal = Mei.displayStore('local', 'users');
  console.log(allUsersFromLocal);
  
  // This will display the 'users' item (if exist) from sessionStorage     
  let allUsersFromSession = Mei.displayStore('session', 'users');
  console.log(allUsersFromSession);
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].