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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:24:47+00:00 2026-05-30T04:24:47+00:00

i am show text on a images one after one. so each line has

  • 0

i am show text on a images one after one. so each line has <BR> tag but when text is showing on image using jquery then BR is not properly translated rather empty space is coming at the top of the page.
here is my script

<div id="HeaderMessage" class="HeaderMsg1">
<span class="HeaderMsg">A LIFETIME WARRANTY FOR EVERY PART WE REMANUFACTURE.<br/>We reengineer the faults out of parts so they won't fail again. Guaranteed.</span>
<span class="HeaderMsg">PROFIT FROM ENGINEERING EXPERTISE.<br/>We offer you reliable parts, low prices and easy access to automotive knowledge.</span>
<span class="HeaderMsg">JOIN US FOR A CAREER THAT CAN TAKE YOU FURTHER, FASTER. <br/>Reengineer your future with a world leader in the remanufacture of electronic automotive parts.</span>
<span class="HeaderMsg">THE SENSIBLE CHOICE IS THE GREENER CHOICE TOO.<br/>Our parts save precious raw materials, reduce automotive waste and require less CO2 to produce. </span>
</div>

$('.HeaderMsg1 span:gt(0)').hide();
    setInterval(function () {
    $('.HeaderMsg1 :first-child').fadeOut()
    .next('span').fadeIn()
    .end().appendTo('.HeaderMsg1');
 }, 5000);

i am not being able to show new line with text when showing text on the image on after one.
please help me. thanks

  • 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-30T04:24:49+00:00Added an answer on May 30, 2026 at 4:24 am

    You have an issue with your selectors.

    Firstly, .HeaderMsg1 :first-child (which really is .HeaderMsg1 *:first-child, which isn’t the same as .HeaderMsg1:first-child) translates to:

    Find .HeaderMsg1, after which get any element that resides under it, which also is a first-child from its parent (can be any parent). That will result in all span‘s and br elements, which results in all the br‘s being appended on the first interval.

    I believe what you really were after was '.HeaderMsg1 span:first-child' (or something similar), which should give you the effect you are after.

    example:
    http://jsfiddle.net/49kvB/

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

Sidebar

Related Questions

Using Graphics2D, I'd like to show a text inside my image, but I'd like
I'm using a DGV to show a list of images with text captions as
I am using the negative-text-indent technique I learned to show a text-image to the
Goal Replace one div with another after 5 seconds delay using jQuery. Description I
I am using infragistic's ultragrid and I want to show the text portion of
I am using TinyMCE Editor Extender and trying to show the text on clicking
I am using this probably ugly javascript to show a text box (in a
I have this jQuery code: <script type=text/javascript> $(function() { $(.one-edition img).hover(function() { $(this).next(.editions-info-text).show(); },
I've created a slideshow using jquery cycle, and each of the slide divs contain
I have a set of images placed as position:relative (showing one next to the

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.