JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q42919F
  • License MIT

Lightweight Javascript DOM manipulation library.

Package Exports

  • the-book-of-hermes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (the-book-of-hermes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

The Book Of Hermes

Lightweight Javascript DOM manipulation library

The Hermetic documentation can be veiwed below. Anyone is welcome to fork and extend this library

DOM selector
Hermes.DOMtraveller('#myID'); //gets ID
or
Hermes.DOMtraveller('.myClass'); //gets Class

For Loop
Hermes.ouroboros(myArray, function(cb){ console.log(cb); });

Event listener
Hermes can listen to any type of Event - "mouseover", "click", "mouseout", "mousemove"
Hermes.listen(selector, eventName, function(e){console.log(e)})

GET Call
Hermes.theft(url, function(data){ console.log(data); });

POST JSON Data
Hermes.give = function(url, data) { }

Effects
This will fade your element in, just pass in your element as a paramater.
Hermes.fadeIn(element);

Basic DOM manipulation:

Hide your element
Hermes.conceal(element);

Show your element
Hermes.reveal(element);

Show & Hide your element
Hermes.toggle(element);

Remove element from DOM
Hermes.destroy(element);

Add element to DOM
Hermes.add(element);

Add a class to your element
Hermes.addClass(element);

Check if your element has a particular class
Hermes.hasClass(element, classNameToTest);

Get CSS value of element, won't return inline styles
Hermes.getCssStaticVals(element, propertyName);

Hermes has access to cookies

Set a Cookie
Hermes.stealCookie(cookieName, cookieValue, daysTillExp);

Get a Cookie
Hermes.getCookieJar(cookieName);

Check for a Cookie
Hermes.checkCookieJar(checkForCookie);

Delete a cookie
Hermes.eatCookie(cookieToDelete);

Hermes also has access to Local Storage

Set Local Storage
Hermes.meetsYourBrowser(name, value);

Get Local Storage
Hermes.remembersYou(localstorageKeyName);

Delete Local Storage Key
Hermes.forgotYou(localStorageName);