Skip to content

vinexs/jextender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

jExtender

This project depend on jQuery. It added some useful object prototype and extended object of jQuery. Nice for web application development.

Feature

Javascript extended
  • Support console logging on old version IE.
  • Support JSON stringify on old version browser.
  • New prototype function for Number, String, Boolean, Date and Array.
jQuery extended
  • Use :appeared to check element visable in screen.
  • Quick add file droppable event to element.
  • Simlate a[href] effect in any element.
  • Detect browser information.

Open a new window with post data.

void post(url, data[, name])
Param Type Description
url String Website url to open.
data Object Post parameters in object form.
name String Window name of new windows, could be '_blank', '_self' or any other name.

Check object has already defined

bool isset(Object obj)
// Alias: isSet
Param Type Description
obj Any Any variable, function, object wanted to check.

Number Prototype

string numberFormat(afterDecimal, splitPoint)
Param Type Description
afterDecimal int Keep number which after decimal.
splitPoint string A char to split the number every 3 char. Default is ",".
int round(length)
Param Type Description
length int Round the number after decimal.
bool isInteger()
bool isEmpty()

String Prototype

int parseNumber()
bool parseBoolean()
object parseParam()
string trim(pos)
Param Type Description
pos char 'L' will trim the space in the start of the string, otherwise will trim the end of the string.
bool isInteger()
bool isNumber()
bool isHtml()
bool isEmail()
bool isURL()
bool isSecureURL() 
bool leftPad(len, word) 
Param Type Description
len int The minimum string length of the result.
word string The string will add to the left while not reach the minimum string length.
bool rightPad(len, word) 
Param Type Description
len int The minimum string length of the result.
word string The string will add to the right while not reach the minimum string length.
string replaceAll(target, replacement);
// Alias: supplant
Param Type Description
target RegEx Matched pattern in string.
replacement string String to replace matched pattern.
string stripTags()
bool contains(str)
// Alias: includes
Param Type Description
str string Check the string contain this part.
bool startsWith(str)
Param Type Description
str string Check the string is start with this part.
bool endsWith(str)
Param Type Description
str string Check the string is end with this part.
bool codeToStatement()

About

Simple Javascript and jQuery extended functions. Useful for development =)

Resources

License

Stars

Watchers

Forks

Packages

No packages published