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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:10:29+00:00 2026-06-13T18:10:29+00:00

ease-scroll is a div with one anchor tag in it. <div id=ease-scroll> <a href=#>&uarr;

  • 0

ease-scroll is a div with one anchor tag in it.

<div id="ease-scroll">
    <a href="#">&uarr; Top</a>      
</div>

I need the div’s opacity to be 0.9 when scrollTop() is greater than 450, and this works as expected, and if I now scroll up thereby scrollTop() value is less than 450, I want to revert the opacity to original value 0.1. But, revert opacity value is not happening.
Any clue what is wrong?

// Help navigate!
jQuery(window).scroll(function () { 
    if ( jQuery(window).scrollTop() > 450 && jQuery("#ease-scroll").css("opacity") != 0.9 ) {
       jQuery("#ease-scroll").animate( {opacity: 0.9}, 'medium');
    }
    if ( jQuery(window).scrollTop() < 450 && jQuery("#ease-scroll").css("opacity") != 0.1 ) {
        jQuery("#ease-scroll").animate( {opacity: 0.1}, 'medium');
    }
});
  • 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-13T18:10:32+00:00Added an answer on June 13, 2026 at 6:10 pm

    jsBin demo

    jQuery(function( $ ){
    
       $(window).scroll(function(){
           
          var scrolled = $(window).scrollTop();
          $("#ease-scroll").stop().animate({opacity: (scrolled>450 ? 0.9 : 0.1) }, 600);
    
       });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using scrollTop to scroll through content div using this var container =
For ease of printing, I want to create one array of pointers to the
is there anyway to ease my page scroll? I'm doing a horizontal page scrolling.
I need your help. I made a nav bar that links to anchor locations
I have 5 pages - for ease lets say: one.html two.html three.html four.html five.html
I need to do an endless horizontal scroll of elements within a parent MovieClip.
I'm trying to use jquery to ease scroll to anchors when clicking on a
I need to create sub folders for my controllers for ease of managing and
I've got two divs, we'll all them id=one and id=two for ease. There is
I'm about to write several Maven plugins to ease the life of the R&D

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.