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 8307331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:30:16+00:00 2026-06-08T18:30:16+00:00

I create simple slider accordion ans it´s my code , ths only problem it´s

  • 0

I create simple slider accordion ans it´s my code , ths only problem it´s for works automatic mode , and works

My Code :

<style>

#ac_content
{
    width:900px;
    height:300px;
    margin:auto;
    background-color:#808080;
    overflow:hidden;
}

#ac_cols_float
{
    position:relative;
    float:left;

    line-width:70px;
    height:100%;
    background-color:#000000;
    margin-right:3px;
    cursor:hand;
    cursor:pointer;
}    

#ac_cols_float_infor
{
    position:relative;
    float:left;
    width4544:535px;
    height:100%;
    background-color:#ff0000;
}    

.rot-neg{
    margin-top:40px;
    margin-left:20px;
    font-size:20px;
    color:#FFFFFF;

    -moz-transform: rotate(90.0deg) translate(-40px,0px);  /* FF3.5+ */
    -moz-transform-origin: 0 100%;
    -o-transform: rotate(90.0deg) translate(-40px,0px);  /* Opera 10.5 */
    -o-transform-origin: 0 100%;
    -webkit-transform: rotate(90.0deg) translate(-40px,0px);  /* Saf3.1+, Chrome */
    -webkit-transform-origin: 0 100%;
    transform: rotate(90.0deg) translate(-40px,0px);  /* Saf3.1+, Chrome */
    transform-origin: 0 100%;
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1.0);  /* IE6,IE7 */
    -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1.0)"; /* IE8 */
}    

#rote
{
    position:absolute;
}
</style>

<script>

var w="900";
var w_col="50";
var n_cols="5";
var margin=3*n_cols;

var result=w_col*n_cols+margin;

var final=w-result;


$(function(){    
    for (i=0;i<=5;i++)
    {       
        $(".ac_"+i+"").css("width",""+w_col);
    }
});

function acordeon(id)
{
    $(function(){
        $(".ac_"+id+"_inf").css("width",""+final);
        $(".ac_"+id+"_inf").show(2000).fadeIn(2000);
        for (i=0;i<5;i++)
        {           
            if (+id==i)
            {

            }
            else
            {
                $(".ac_"+i+"_inf").hide(1000);
            }
        }
    });
}
</script>

<script>

// AUTOMATIC MODE NO WORKS !!!

for (i=0;i<=5;i++)
{    
    setTimeout(function(){
        acordeon(i);
    },1000); 
}

</script>


<div id="ac_content">    
    <div id="ac_cols_float" class="ac_1" onclick="javascript:acordeon(1);"><div class="rot-neg">Web Design .....</div></div>
    <div id="ac_cols_float_infor" class="ac_1_inf" style="display:none;"></div>

    <div id="ac_cols_float" class="ac_2" onclick="javascript:acordeon(2);"></div>
    <div id="ac_cols_float_infor" class="ac_2_inf" style="display:none;"></div>

    <div id="ac_cols_float" class="ac_3" onclick="javascript:acordeon(3);"></div>
    <div id="ac_cols_float_infor" class="ac_3_inf" style="display:none;"></div>

    <div id="ac_cols_float" class="ac_4" onclick="javascript:acordeon(4);"></div>
    <div id="ac_cols_float_infor" class="ac_4_inf" style="display:none;"></div>


    <div id="ac_cols_float" class="ac_5" onclick="javascript:acordeon(5);"></div>
    <div id="ac_cols_float_infor" class="ac_5_inf" style="display:none;"></div>
</div>

The problem it´s where you can see // AUTOMATIC MODE NO WORKS !!! , the other works nice and perfect , Regards and thank´s for your help !

  • 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-06-08T18:30:17+00:00Added an answer on June 8, 2026 at 6:30 pm

    Also seems to have some scope-issues. I would put the acordeon-function inside an object literal (namespace-ish), so that you have more control over it:

    Take a look at this fiddle: http://jsfiddle.net/3mfJ2/

    What I’ve changed is basically this:

    myfuncs = {
        acordeon: function(id)
            {
                $(function(){
                    $(".ac_"+id+"_inf").css("width",""+final);
                    $(".ac_"+id+"_inf").show(2000).fadeIn(2000);
                    for (i=0;i<5;i++)
                    {           
                        if (+id==i)
                        {
    
                        }
                        else
                        {
                            $(".ac_"+i+"_inf").hide(1000);
                        }
                    }
                });
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to create simple PHP COMET server page displaying current time? I need code
I'm looking at trying to create a simple 'slider puzzle' game. You've seen the
I am trying to create a simple user control that is a slider. When
I would like to create a simple content slider that would slide content continuously
I'm trying to create a very simple jQuery slider; however, to get started, I
I use this code to create a simple jquery carousel animation: $(document).ready(function() { var
trying to create a simple slider for an input. Using a survey gem that
I am trying to create a simple JQuery Div Slider, but it doesn't seem
I've got into a rather simple, yet annoying problem. I'm trying to create a
I want to create a simple slider like the one I ve shown in

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.