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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:21:29+00:00 2026-05-16T05:21:29+00:00

All of this is code is here: http://jsfiddle.net/yrgK8/ I have a news section which

  • 0

All of this is code is here:
http://jsfiddle.net/yrgK8/

I have a “news” section which is composed of the following:

<ul id="news">

      <li><p>asfdsadfdsafdsafdsafdsafdsafdsafdsa</p></li>
      <li><p><a href="http://google.com">google.com link</a</p></li>                   
 </ul>                          
                <div id="newsNav">
                    <span id="newsRight"><a href="#"><img src="http://engineercreativity.com/samples/einav/images/newsleft.png" alt="&gt;" /></a></span>
                    <span id="newsLeft"><a href="#"><img src="http://engineercreativity.com/samples/einav/images/newsright.png" alt="&lt;" /></a></span>
                </div><!-- /#newsNav -->

And I have the following CSS code (simple, just pretty much overlay the li’s on top of each other with absolute positioning):

ul#news { list-style-type: none; position:relative; height:101px; color: black; }
ul#news > li { font-size: 11px; margin: 10px; margin-right: 15px; position: absolute; top: 0; right:0; opacity: 0; filter:alpha(opacity=0);  color: black; }

And finally, this is the jQuery code that makes it all happen. Basically what it does is it animates the opacity of one LI to 0, and then animates the opacity of the next LI to 1.

$('ul#news li:first').addClass('active').addClass('firstNews');

$('ul#news > li').css({opacity:0.0}).filter('ul#news  li.firstNews').css({opacity:1.0});
$('#newsLeft').click(function() {

    var $active = $('ul#news li.active');
    var $next = $active.next().length ? $active.next() : $('ul#news li.firstNews');

        $active.animate({opacity:0.0}, 300, function() {
            //when done animating out, animate next in
            $next.css({opacity:0.0})
                .animate({opacity: 1.0}, 400, function() {
                $active.removeClass('active');
                $next.addClass('active');
        });
    });

    return false; 
}); //clickRight

$('#newsRight').click(function() {

    var $active = $('ul#news li.active');
    var $previous = $active.prev().length ? $active.prev() : $('ul#news li.firstNews');

        $active.animate({opacity:0.0}, 300, function() {
            //when done animating out, animate next in
            $previous.css({opacity:0.0})
                .animate({opacity: 1.0}, 400, function() {
                $active.removeClass('active');
                $previous.addClass('active');
        });
    });

    return false; 
}); //clickRight

So what’s the problem? The problem is that they’re stacked on top of each other. This works if the LIs only contain text. However, some of them contain links. This becomes a problem when there’s an LI with opacity of 0 that’s stacked on top of your LI with opacity of 1 and which contains a link. You can’t click the link.

Anyone know how I can fix this?

Thanks a lot,

Amit

  • 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-16T05:21:29+00:00Added an answer on May 16, 2026 at 5:21 am

    Set z-index of active item to some high value, so it will be above them all, and links shouldn’t be problem any more.

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

Sidebar

Related Questions

Hey all i have this code here on jsfiddle: http://jsfiddle.net/d7UjD/6/ I have 2 problems
my code here http://jsfiddle.net/GKZRU/14/ all js working properly, and add/remove css classes(checking this in
Here is my current code, http://jsfiddle.net/HRZ3D/2/ with it I have been unable to do
I found this count down timer code here http://jsfiddle.net/QH6X8/ I would like to make
This code works fine here http://jsfiddle.net/LH7sy/11/ It tries to find sml( and )sml in
I have Tabbed Navigation here: http://jsfiddle.net/EghAt/ When I click Tab 1 it outputs all
I have nearly finished writing this code: http://jsfiddle.net/2Jkk9/11/ but I can't figure out how
Ok, if you go here: http://jsfiddle.net/RarFB/2/ You will see the work that I have
EDIT My jsfiddle entry is here : http://jsfiddle.net/ehNrE/3/ All the codes(only those required) below
What I have is in my fiddle here http://jsfiddle.net/mPuj9/4/ What I tried to do

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.