Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6593033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:37:50+00:00 2026-05-25T17:37:50+00:00

Here is the code. I can’t make opacity animate as well. <!DOCTYPE html> <html>

  • 0

Here is the code. I can’t make opacity animate as well.

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>

        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

        <style type="text/css">
            body{
                background: #000;
                color: #fff;
                font-family: Arial, sans-serif;
            }
            .menu{
                position: absolute;
                top: 10px;
                left: 0px;
                z-index: 11;
                width: 700px;
                height: 60px;
            }
            .menu a{
                background-color: #808080;
                margin-bottom: 2px;
                display: inline;
                width: 150px;
                height: 60px;
                color: #fff;
                line-height: 60px;
                text-align: center;
                text-transform: uppercase;
                outline: none;
            }
            .menu a:hover{
                color: #000;
                background-color: #fff;
            }
            #main-wrapper{
                position: absolute;
                left: 1000px;
                top: 10px;
                width: 900px;
                height: 380px;
                background-color: #000;
                opacity: 0.1;
                filter: alpha(opacity=10);
                -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
                filter: alpha(opacity=10);
                z-index: 9999;
                zoom: 1;
                color: #fff;
            }
            #main-wrapper .active{
                display: block;
            }
            .id-two{
                padding: 10px;
                display: none;
            }
            .id-three{
                padding: 10px;
                display: none;
            }
            .id-four{
                padding: 10px;
                display: none;
            }
            #slider_window{
                position: relative;
                left: 110px;
                width: 85%;
                height: 400px;
                background-color: #8ae234;
                overflow: hidden;
                top: 120px;
            }
        </style>
        <script type="text/javascript">
            jQuery(document).ready(function($){
                var current_elem_class;

                var close_active_page = function(current_id){

                    if(current_id != current_elem_class){
                        var left_position = '1000px';
                        $("#main-wrapper").stop().animate({
                            opacity : 0.1,
                            left :  left_position
                        }, {
                            "duration": 700,
                            //"easing": "easeInOutBack",
                            complete: function(){
                                //alert('complete');
                                if(typeof current_elem_class != 'undefined'){
                                    $("div." + current_elem_class).removeClass('active');
                                    current_elem_class = current_id;
                                    if(current_id != 'id-one'){
                                        open_non_active_page("div." + current_elem_class);
                                    }
                                }else{
                                    current_elem_class = current_id;
                                    if(current_id != 'id-one'){
                                        open_non_active_page("div." + current_elem_class);
                                    }
                                }
                            }
                        });
                    }
                }

                var open_non_active_page = function(elem){

                    var left_position = '10px';

                    $(elem).addClass('active');

                    $("#main-wrapper").stop().animate({
                        opacity : 0.6,
                        left: left_position
                    },{
                        "duration": 700,
                        //"easing": "easeInOutBack",
                        complete: function(){
                            $("#main-wrapper").stop().animate({
                                opacity : 1.0,
                                left: left_position
                            },{
                                "duration": 1000
                            });
                        }
                    });
                }

                $("a.button").bind('click',function(){
                    close_active_page($(this).attr('id'));
                });
            })
        </script>
    </head>
    <body>
        <div id="menu" class="menu">
            <a href="#" id="id-one" class="button close_all">Close all</a>
            <a href="#" id="id-two" class="button">Close all - Open Two</a>
            <a href="#" id="id-three" class="button">Close all - Open Three</a>
            <a href="#" id="id-four" class="button">Close all - Open Four</a>
        </div>
        <div id="slider_window">
            <div id="main-wrapper" class="">
                <div class="id-two">
                    <p><h2>Two</h2><br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent adipiscing, magna a porttitor consequat, libero augue gravida lacus, vitae blandit elit eros sed sem. Pellentesque convallis aliquam ante at pretium. Nam at semper ligula. Integer blandit tellus in libero accumsan eleifend. Maecenas hendrerit ante velit. Aenean ultricies vehicula iaculis. Aliquam id orci et lacus egestas elementum. Aliquam erat volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam viverra sollicitudin tortor, at ultricies enim mollis ut. Etiam facilisis vulputate justo, sed venenatis justo ullamcorper porta.</p>
                </div>
                <div class="id-three">
                    <p><h2>Three</h2><br />Aliquam id orci et lacus egestas elementum. Aliquam erat volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam viverra sollicitudin tortor, at ultricies enim mollis ut. Etiam facilisis vulputate justo, sed venenatis justo ullamcorper porta.</p>
                </div>
                <div class="id-four">
                    <p><h2>Four</h2><br />Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, cula iaculis. Aliquam id orci et lacus egestas elementum. Aliquam erat volutpat. Vestibulum ante ipsum primis in faucibutor, at ultricies enim mollis ut. Etiam faci</p>
                </div>
            </div>
        </div>
    </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:37:51+00:00Added an answer on May 25, 2026 at 5:37 pm

    You don’t have to use stop() function on open_non_active_page. In this chain of events when
    close_active_page is called it will stop any opening animation.

     var open_non_active_page = function(elem) {
    
            var left_position = '10px';
    
            $(elem).addClass('active');
    
            $("#main-wrapper").animate({
                opacity: 0.6,
                left: left_position
            }, 700, function() {
    
                $("#main-wrapper").animate({
                    opacity: 1.0,
                    left: left_position
                }, {
                    queue: false,
                    duration: 1000
                });
            });
    
        }
    

    http://jsfiddle.net/ywre2/5/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a weird code here that I need to make work.. can you
I can't get my dojo working. I've tried everything. Here is the code: <!DOCTYPE
Admob code can't see on device. I followed the instructions here: http://www.admob.com/docs/AdMob_Android_SDK_Instructions.pdf everything ok,
you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
For some reason my bind events won't work. You can see my code here:
Here's some code I saw once. Can you see what's wrong with it? [updated]
How can i reset a display:none and add some value here is the code
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
How can I return a value from ShowStatus elapsed event? Here is my code.
I have some code that is using SyncEnumerator. As you can see here ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.