This project depend on jQuery. It added some useful object prototype and extended object of jQuery. Nice for web application development.
- Support console logging on old version IE.
- Support JSON stringify on old version browser.
- New prototype function for Number, String, Boolean, Date and Array.
- 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.
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. |
bool isset(Object obj)
// Alias: isSet
Param | Type | Description |
---|---|---|
obj | Any | Any variable, function, object wanted to check. |
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()
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()