Skip to content

A simple utility library for browser-end JavaScript.

License

Notifications You must be signed in to change notification settings

wwsun/seu-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seu-utils

A simple utility module for cross browsers.

Usage

  1. Import the seu-util.js file in your html:
<script src="lib/seu-util.js"></script>
  1. Using the utility functions:
var myBtn = document.querySelector('#myBtn');
SeuUtil.event.addHandler(myBtn, 'click', function (event) {
  console.log(event.type);
  alert(this.value);
});

API

SeuUtil.event

  1. addHandler(element, type, handler)
  2. removeHandler(element, type, handler)
  3. getTarget(event)
  4. preventDefault(event)
  5. stopPropagation(event)

About

A simple utility library for browser-end JavaScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published