- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am using the “Slide To Unlock” app/css and I need some help with adding
a “REDIRECT / LINK” when the “slider” makes it to the end.
Where it automatically “jumps / goes” to the URL of my choice.
Any idea what I need to do / add ?
Here is the code:
< link rel= 'stylesheet' href='LINK TO FILE/style.css' >
head >
< body >
< script src='LINK TO FILE/jquery.min.js' > script >
< script src='LINK TO FILE/jquery-ui.min.js' > script >
< script src='LINK TO FILE/slidetounlock.js' > script >
< div id="page-wrap" >
< div id="well" >
< h2 >< strong id="slider" > strong > < span >slide to unlock span > h2 >
div >
div >
Ok I got it figured out.
All I needed to do was to add one line of code to the
“scrolltounlock” javascript file.
For those who would like to be able to have it “jump”
to any URL of your choice, just modify the JS file
mentioned above.
Locate this section (is at the top) and add in the line:
window.location … (seen below.)
*** Do not copy and paste because there are spaces separating the code ***
$ ( function () {
$( “#slider” ). draggable({
axis: ‘x’,
containment: ‘parent’,
drag: function(event, ui ) {
if ( ui.position.left > 550) {
$ ( “#well” ). fadeOut();
window. location= ” http:// URL OF YOUR CHOICE “;
} else {
This seems like a very nice slider! Can I just ask do you know a tutorial or something I can look at to be able to make this???
Thanks in advance