Skip to content

amirho3inh/GolabiJs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

GolabiJs

add features to jquery easily

jQuery version download size

Requirements

features requires the following to run:

Usage

to put element in the center of page:

$('#elm').center();

to put element in the center of a box element:

$('#elm').center('#box');

convert english digit to persian digit:

toPersianNum(1); //output: ۱

convert persian digit to english digit:

toEnglishNum(۱); //output: 1

get url parameter:

//url: http://www.example.com/?id=51&name=test
getUrlParameter('id'); //output: 51
getUrlParameter('name'); //output: test

get file size format:

formatBytes(51250000, 2); //output: 51.25 MB
formatBytes(51250000, 1); //output: 51.2 MB

mobile detect:

isMobile(); //output: if has True then open page in mobile

mobile and tablet detect:

isMobileAndTablet(); //output: if has True then open page in mobile or tablet

search value in json:
example:
keyInput = title
valueInput = test2
json = [{id:1,title:'test'}, {id:2,title:'test2'}]
result = {id:2,title:'test2'}

searchInJson(keyInput,valueInput,json); //output: result json

call function and count up element class .count :

countUp();

persian str validation

justPersian(str); //output: true or false

License

GolabiJs is licensed under the MIT license.
Copyright © 2018, Amirhossein Hashemi

About

add feature to jquery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published