0.8.8 • Published 5 years ago

janst123_js.js v0.8.8

Weekly downloads
76
License
MIT
Repository
github
Last release
5 years ago

js.js

This is a collection of often needed Pure-JS helper functions. No need to load a big framework like jQuery etc. Feel free to extract single functions or use the whole collection.

All functions are tested on modern Browsers (Edge, IE >= 10, Firefox, Chrome, Chrome on Android, Chromium, Safari, Safari Mobile)

See it in action on

Usage

Installation

npm install --save js.js

Use

var js=require('js.js');

Some of the Features

  • onReady Callback
    • Usable at every time in the application
  • Ajax
    • GET
    • POST
    • JSON
    • jQuery Like Interface
    • Form serialization
  • DOM Manipulation
    • Append Element
    • Prepend Element
    • Place Alement after
    • Place Element before
  • CSS Classes
    • hasClass
    • addClass
    • removeClass
  • Animations
    • Animated Scrolling (CSS3)
  • Event-Handling
    • Trigger Browser-Events on Elements
    • Add and safely-remove event-handlers to/from elements
    • Trigger Event Handlers
    • Handle Long-Touch Event
  • Cookies
    • Set Cookie
    • Get Cookie
  • LocalStorage
    • Get Value
    • Set Value
  • Other Helpers
    • Quote RegExp special chars
    • Update Meta Tags
    • Update Link Tags
    • Select All Text in Input
    • Derefecence Object