verify.js---multiple verifying ways with jQuery


Verify.js is a plugin for verifying that users are not robort, which contains five ways such as regular,slide,calculation, puzzle and choosing words in order.

GitHub here
More documents here

Step1:
<!--link CSS-->
<link rel="stylesheet" type="text/css" href="css/verify.css">

<!--link JQUERY-->
<script type="text/javascript" src="js/jquery.min.js"></script>

<!--link JS-->
<script type="text/javascript" src="js/verify.min.js"></script>
HTML:
HTML
Basic html for five types of verifications.

HEAD:
HEAD
 Link the verify.css file in the head. And a little stylish for sections.

Step2:
JS
link js in body
(1)regular

panel1.js
$('#id').codeVerify({attributes...});

Expaination:

attriburesexplain
typedefault is 1.  
widththe width of verification code, percentage available
heightthe height of verification code, percentage available
fontSizeteh font size.default is 30px。
codeLengththe number of verificaiton code.default is 6
btnIdthe id name combined to the button

events

nameexpain
readythe function when ready
successthe events function after success verifying. If you want to refresh:success:function(obj){obj.refresh();}。
errorthe function when the verification is not successd


(2)calculation

panel2.js
$('#id').codeVerify({attributes...});


attributesexplain
typetype is 2
figuredefault is 100,double-digit numbers. 
arithplus,minus, multiple awaiable.plus=1,minus=2,multiple=3.random=0
(3)slide

panel3.js
Explaination

attributesexpain
typedefault=1
vOffsetmagnitude of error
barSizeWidth and height of bar. eg:barSize:{width:'100%',height:'40px'}

events

nameexpain
readythe function when ready
successthe events function after success verifying. If you want to refresh:success:function(obj){obj.refresh();}。
errorthe function when the verification is not successd

(4)puzzle
panel4.js
$('#id').slideVerify({attributes....});

expaination

attrributesexplain
typedefault=2
vOffsetmagnitude of error
vSpacethe space between image and bar.units:px
imgNamethe array of images,default from the folder "images",eg:imgName : ['1.jpg', '2.jpg']。
imgSizeWidth and height of images.eg:imgSize:{width:'100%',height:'200px'}。
blockSizewidth and height of blocks. eg:imgSize:{width:'40px',height:'40px'}。
barSizewidth and height of bar. eg:barSize:{width:'100%',height:'40px'}

events

nameexpain
readythe function when ready
successthe events function after success verifying. If you want to refresh:success:function(obj){obj.refresh();}。
errorthe function when the verification is not successd

(5)choosing words in order
panel5.js
$('#id').pointsVerify({attributes...});

explaination

attributesexplain
defaultNumthe number of verifying words.defaultNum:4。
checkNumcompare words number.checkNum:2。
vSpacethe space between image and bar.units:px
imgNamethe array of images,default from the folder "images",eg:imgName : ['1.jpg', '2.jpg']。
imgSizeWidth and height of images.eg:imgSize:{width:'100%',height:'200px'}。
barSizewidth and height of bar. eg:barSize:{width:'100%',height:'40px'}

events

nameexpain
readythe function when ready
successthe events function after success verifying. If you want to refresh:success:function(obj){obj.refresh();}。
errorthe function when the verification is not successd






Popular posts from this blog

Fancyapps — easily build overlay windows with carousel

Meet Mantine: A TS-Based Open-Source React Components Library

Meet Tippy.js: The Complete Tooltip Popover Plugin