Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to activate link to slide to unlock

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43959
    kickstart
    Participant

    Hey …I have downloaded “Slide to unlock ” trick for webdesign from this site.But i wanted to know how to make it redirected to a web page when it is unlocked.

    Hope you;ll help me out with this…

    #131016
    pixelgrid
    Participant

    [EDIT]
    in the code provided by chris coyier in the draggable section add a callback function with a window.location javascript redirect to the fadeOut function so you redirect after the slider has faded out

    $(function() {
    $(“h2 img”).draggable({
    axis: ‘x’,
    containment: ‘parent’,
    drag: function(event, ui) {
    if (ui.position.left > 550) {
    $(“#well”).fadeOut(function(){
    window.location(‘http://www.google.com’);
    });
    }
    },
    stop: function(event, ui) {
    if (ui.position.left < 551) {
    $(this).animate({
    left: 0
    })
    }
    }
    });
    });

    #131025
    kickstart
    Participant

    Yea this is good..but now i am not able to drag the slider…

    #131027
    pixelgrid
    Participant

    see the debugging console you must have something missing

    #131145
    kickstart
    Participant

    okay let me check..Anyway thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.