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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:44:17+00:00 2026-06-13T08:44:17+00:00

I am trying to make a jQuery slider but with div’s: <div id=block-1> <div

  • 0

I am trying to make a jQuery slider but with div’s:

<div id="block-1">
        <div id="bannerleft">
            <div class="wsite-header-1"></div>
        </div>
        <div id="bannerright">
            <h2><span class='wsite-text'>CALL US NOW!</span></h2>
            <p><span class='wsite-text'>Call now and get&nbsp;professional service delivered to you by our team of professional plumbers and technicians.<br/><br/>24/7 Emergency Service available</span></p>
            <div style="text-align:left;"><div style="height: 0px; overflow: hidden;"></div>
<a class="wsite-button wsite-button-large wsite-button-highlight" href="contact-us" >
<span class="wsite-button-inner">CALL NOW 1</span>
</a>
<div style="height: 0px; overflow: hidden;"></div></div>
        </div>
        </div>

<div id="block-2" style="display:none;">
        <div id="bannerleft">
            <div class="wsite-header2"></div>
        </div>
        <div id="bannerright">
            <h2><span class='wsite-text'>CALL US NOW! 2</span></h2>
            <p><span class='wsite-text'>Call now and get&nbsp;professional service delivered to you by our team of professional plumbers and technicians.<br/><br/>24/7 Emergency Service available</span></p>
            <div style="text-align:left;"><div style="height: 0px; overflow: hidden;"></div>
<a class="wsite-button wsite-button-large wsite-button-highlight" href="contact-us" >
<span class="wsite-button-inner">CALL NOW 2</span>
</a>
<div style="height: 0px; overflow: hidden;"></div></div>
        </div>
        </div>

And here is the jQuery part

$(document).ready(function() {

     function animate(){
         $('#block-1').toggle().delay(3000);    
         $('#block-2').toggle().delay(3000); 
         $('#block-3').toggle().delay(3000);         
     } animate();  
     setInterval(animate, 10000);  

});

Sadly it doesn’t work. It goes to block-2 right away and when it displays block-1 it also shows block-3 under it. Any way how to fix this code?

  • 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-13T08:44:18+00:00Added an answer on June 13, 2026 at 8:44 am

    Here I created a demo that fades nicely your elements.
    Just added a class .fade to all your main DIVs, and a CSS position:absolute; to make them overlay properly one over the other.

    jsBin demo

    This one will also allow you to pause the slides on hover!

    var S = 0,             // START 'SLIDE'
        $el = $(".fade"),  // FADE ELEMENTS
        Tim;               // TIMEOUT VAR
    
    function anim(){
      $el.eq(S=++S%$el.length).fadeTo(500,1).siblings($el).stop(1).fadeTo(500,0);
    }
    
    function autoAnim(){
        Tim = setTimeout(function(){
          anim();
          autoAnim();
        },4000);
    }
    autoAnim();
    
    $el.on('mouseenter mouseleave',function(e){
       var m = e.type==='mouseenter' ? clearTimeout( Tim ) : autoAnim();    
    }).eq(S).show().siblings($el).hide();
    

    HTML:

    <div id="block-1" class="fade"></div>
    <div id="block-2" class="fade"></div>
    <div id="block-3" class="fade"></div>
    

    CSS:

    .fade{
      position:absolute;
    }
    

    Just borrowed the code from a plugin of mine, i you’re interested you can take a look
    Or if you have Q about the above, feel free to ask

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

Sidebar

Related Questions

I'm trying to make a slider from scratch like the jQuery UI one but
I'm am trying to make my javascript/jquery slider button deactivated when it reaches the
I'm am trying to make my javascript/jquery slider button deactivated when it reaches the
I am trying to make a prensentation using jquery but the next button is
At the moment I need to make an slider for an <div> . But
I am trying to make some text scroll vertically using jQuery, I have been
I'm trying to implement a jQuery slider into my website to make a projects
Using the jQuery UI Slider, I'm trying to figure out how to make it
I am trying to make a simple jquery slideshow, but I am not able
I'm trying to make jQuery UI Slder as slider for choose 'font-size'. I don't

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.