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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:08:04+00:00 2026-06-05T02:08:04+00:00

I have a javascript slider located on a page at: crothersenvironmental.com/crothers/index.html that keeps sending

  • 0

I have a javascript slider located on a page at: crothersenvironmental.com/crothers/index.html that keeps sending the associated paragraph text under it off the side of the screen. You can see it under the slider down to the right. Once you click the associated numbers above the slider you’ll see the text move to the right every time the numbers are clicked until they are moved off the screen and disappear. Also, once you click #1 the footer comes way up and then moves back down after you click any of the other numbers.

Any help, thoughts or direction would be very helpful. Thanks very much in advance.

Here is the js script I am using:

$(‘#recentprojects li a’).click(function() {

var $this = $(this);

if ( !$this.parent('li').hasClass('selected') ) {

    var url = this.href,
        height = $('#recentworkimage img').css('height');

    $this
      .parents('ol')
      .find('li.selected')
        .removeClass('selected');

    $this.parent('li').addClass('selected');

    $('#recentworkimage')
      .css('height', height)
      .children('img')
        .fadeOut(1000, function() {
            $(this).attr('src', url).load(function() {
                $(this).fadeIn(1000);
            });

        $this.parents('#recentprojects')
          .find('p:last')
            .empty()
            .html('<p>' + $this.attr('title') + '</p>');
    });

}

return false;

});

  • 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-05T02:08:06+00:00Added an answer on June 5, 2026 at 2:08 am

    First of all, you do not need to empty the element before setting the new HTML string, as .html() already replaces the whole contents. The reason your subtitle is moving more and more to the right, is because you’re adding <p> elements recursively.

    Try the following:

    $this.parents('#recentprojects')
        .find('p:last')
        .html($this.attr('title'));
    

    Although in this case (as you ar looking up a unique ID) you could simplify like so:

    $('#recentprojects')
        .find('p:last')
        .html($this.attr('title'));
    

    Or if this is the only <p> you have within that element, you can reduce even further:

    $('#recentprojects p')
        .html($this.attr('title'));
    

    If you want to update the subtitle with JavaScript when the page loads, add the following:

    $(document).ready(function () {
        var projects = $('#recentprojects');
        projects
            .find('p:last')
            .html(projects
                .find('a:first')
                .attr('title'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Javascript function defined in the main index.html file. One part of this
I have a function that is a JavaScript slider. When its moved, it outputs
I have this javascript code that creates a slider: http://jsfiddle.net/samccone/ZMkkd/ Now, i want to
You may have seen JavaScript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular
Hi I'm looking for a simple Javascript Image slider that have the following features.
I have a problem with a javascript error: $(#slider) is undefined How can i
I have Javascript that opens another window and registers a click handler for all
I have JavaScript that is doing activity periodically. When the user is not looking
I have javascript code embedded inside a html template file. When I load this
I have javascript string variable with var sttr=We prefer questions that can be answered

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.