Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Horizontal slide toggle

    • 0
    • 3
    • 3
    • 1
    • 0
    • 0
    • 0
    • 0
    • 1.73k
    Comment on it

    Hi all,

    If you would like to have the horizontal toggle options, according to example when you click on the button to slide, it will play the animation reversed and hide the element. See the below example to toggle slide a div.

    Script:-

    $(document).ready(function(){
        $('#slide').click(function(){
         $('.box').animate({
            'right' : $('.box').css('right') == '0px' ? '130px' : '0px'
        }, 200);
        });
    });
    

    Html:-

    <div class="wrap">
        <div class="box">center</div>
        <button type="" id="slide">Slide</button>   
    </div>
    

    Output :-

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: