» » Use jQuery slide to unlock

 

Use jQuery slide to unlock

Author: bamboo06 on 18-02-2019, 22:41, views: 430

1
Unlock.js is a jQuery slide unlock plugin. At present, many websites use the verification method of sliding to unlock when a user logs in and registers to prevent malicious attacks. The user needs to slide the specified slider to the specified position in order to pass the verification. Unlock.js can implement this sliding unlock function.

The unlock.js plugin has the following features:
Slide to unlock.
Size, color, font size, etc. can be customized.
After the unlock is completed, there will be a callback function to trigger further data processing.

how to use
1. First introduce the unlock.css and unlock.js files into the page.
<link href="css/unlock.css" rel="stylesheet">
<script src='js/unlock.js'></script>

2. Then lay out the structure of the simple HTML, using a /div/ as the container for the slider.
<!--slider container -->
<div id = "foo"></div>

3. Finally initialize the plugin. After the page DOM element is loaded, the sliding unlock plugin can be initialized by the following method.
var $container = $('#foo');
$container.slideToUnlock(options);  


Configuration parameter
The configuration parameters of the unlock.js slide unlock plugin are:
Parameter -Default-Description
Width- defaults to the width of the container- width of the slider
Height- defaults to the height of the container- height of the slider
bgColor- #E8E8E8- The background color of the slider
progressColor- #FFE97F- progress color
handleColor -#fff- The color of the slider handle
succColor-#78D02E- Color after successful unlocking
Text -'slide to unlock' -default text on the slider
textColor- #000 -The color of the text
succText -'ok!'- text displayed after successful unlocking
succTextColor-#000 -The text color displayed after successful unlocking
succFunc -function() { alert('successfully unlock!'); }- Callback function after successful unlocking

Category: Javascript / Plugins

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
<
  • 0 Comments
  • 0 Articles
28 February 2019 16:44

hoowei

Reply
  • Group: Guests
  • –†Registered date: --
  • Status:
 
There are so many people with the problem of lace wigs uk that is somewhere making them publicly complex, but now they will go to face such situations as they are having all kind of brazilian hair uk to add style to their personality and also make them feel younger and good. Many people go back and forth weather to have the human hair extensions uk or not but they can now go to have this, this is something that is inexpensive to have and also one can afford this. Talking about the varieties then, there is absolutely lot of varieties to have, the lace wigs uk are virtually endless. Coming to the variety then there are hair extensions uk that are in demand from most of the people, as they look natural and even better than synthetic hair wig, well there is a choice depends on what you want in your wig and how you will going to wear it and how much time you can spend to take care of.

Information
Comment on the news site is possible only within (days) days from the date of publication.