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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:33:28+00:00 2026-06-01T03:33:28+00:00

I am trying to do a function after my first slide has shown. I

  • 0

I am trying to do a function after my first slide has shown. I basically want to do the same function after each slide, but my 2nd slide is just still. Nothing is fading in or coming in.

Here is my JQuery

$("#slideshow").cycle({
            fx: 'scrollHorz',
            pager: '#slideshow-nav',
            speed: 600,
            timeout: 7000,
            pauseOnPagerHover: true,
            containerResize: false,
            slideResize: false,
            fit: 1,
            before: beforeSlide,
            after: afterSlide
        });

        function beforeSlide() {
            $("#slideText").css('padding-left', '0px');
            $("#slideText").css('opacity', '0');
        }

        function afterSlide() {
            $("#slideText").animate({ opacity: 1, paddingLeft: '+=100px'}, 600);
        }

Here is my html

    <div id="slideshow" class="slides">
    <div class="slide" style="background-image: url('slideOne.jpg'); background-color: #e3d7bd;">
        <div id="slideText">
            <h1>asdf</h1>
            <br />
            <p>asdf</p>
            <p>asdf</p><br />
            <a href="" class="started">Get started today</a>
        </div>
    </div>

    <div class="slide" style="background-color: #fff;">
        <img class="slideTwoImage" src="slideTwoKid.png"></img>
        <div id="slideText">
            <h1>Test.</h1>
            <br />
            <p>asdf</p>
            <p>asdf</p><br />
            <a href="" class="started">Get started today</a>
        </div>
    </div>
    <!-- <div class="slide" style="background-image: url('slideTwo.jpg'); background-color: #fff; display: none;"></div>
    <div class="slide" style="background-image: url('slideThree.jpg'); background-color: #000; display: none;"></div> -->
</div>

It works for the first slide..the animation for the text, but on the 2nd slide it is not working.

  • 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-01T03:33:29+00:00Added an answer on June 1, 2026 at 3:33 am

    I figured it out. You have to name elements in the before and after function differently.

    I had them both named #slideText as you can tell in the functions. Just name them separate.

                $("#slideshow").cycle({
                fx: 'scrollHorz',
                pager: '#slideshow-nav',
                speed: 600,
                timeout: 7000,
                pauseOnPagerHover: true,
                containerResize: true,
                slideResize: false,
                fit: 1,
                before: beforeSlide,
                after: afterSlide
            });
    
            function beforeSlide() {
                $("#slideText").css('padding-left', '0px');
                $("#slideText").css('opacity', '0');
                $("#slideTextTwo").css('padding-left', '0px');
                $("#slideTextTwo").css('opacity', '0');
            }
    
            function afterSlide() {
                $("#slideText").animate({ opacity: 1, paddingLeft: '+=100px'}, 600);
                $("#slideTextTwo").animate({ opacity: 1, paddingLeft: '+=100px'}, 600);
            }
    

    So now I can make changes on separate slides the way I intended.

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

Sidebar

Related Questions

I want to have one callback function after actions are done, I'm trying something
Im trying to write a function that will convert all charactewrs after the first
I'm trying to call a function after I load some XML into Actionscript, and
I am trying to create a loop function based on the time. After the
$('#div1').focus(function () { callAnotherFunction(); $(this).animate({}); } I'm trying to make $(this).animate({}); execute after callAnotherFunction();
I am trying to write a very simple slide up and slide function that
I'm trying to combine matching something like: $(.item).each(function(i) { //animation here }); with jQuery's
Trying to make it so that the glob function displays only the first 10
I'm trying to achieve the same blind roll down looking effect google+ has for
I'm trying to write a function that can alter the value of a column

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.