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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:58:01+00:00 2026-06-13T08:58:01+00:00

The header to my tumblr page seems a bit jumpy when I attempted to

  • 0

The header to my tumblr page seems a bit jumpy when I attempted to animate its growth and shrinkage when it is no longer on the top of the page.

The webpage is Tobacco Endeavors and is a tumblr blog.

<script type="text/javascript">                                         
    $(window).scroll(function(){ 
        if ($(this).scrollTop() > 1) {
            $("#abracadabra").fadeOut(500, function(){ 
                $("#header").animate({padding:"1.5em 0"}, 500);
            });
        } else {
            $("#abracadabra").fadeIn(500, function(){ 
                $("#header").animate({padding:"1em 0"}, 500);
            });
        }
    }); 
</script>

Thanks a bunch guys.

  • 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-13T08:58:02+00:00Added an answer on June 13, 2026 at 8:58 am

    The scroll event could fire many times, you need to control concurrency with a flag, like so:

    <script type="text/javascript">
        window.flag = true;                                         
        $(window).scroll(function(){ 
            if ($(this).scrollTop() > 1) {
                if (window.flag) {
                   window.flag = false;
                   $("#abracadabra").fadeOut(500, function(){ 
                       $("#header").animate({padding:"1.5em 0"}, 500, function() {window.flag = true;});
                   });
                }
            } else {
                if (window.flag) {
                   window.flag = false;
                   $("#abracadabra").fadeIn(500, function(){ 
                       $("#header").animate({padding:"1em 0"}, 500, function(){window.flag = true;});
                   });
                }
            }
        }); 
    </script>
    

    UPDATE:

    Updated a typo in code. Try new version above.

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

Sidebar

Related Questions

I have a tumblr page with Isotope and I was wondering if its possible
So I've got an example of what is the header on my Tumblr Page
I would like to integrate my tumblr feed in to my website. It seems
My friend asked me to add a header image advert to his Tumblr blog,
Header not coming in first page but comming in all other pages in mpdf.
_header.html.erb <header class=navbar navbar-fixed-top> <div class=navbar-inner> <div class=container> <%= link_to sample app, root_path, id:
Header $(document).ready(function() { $('#user_box').animate({width: 263px}, slow); $('#submit').click(function(){ $('#user_box').animate({width: 0px}, slow); }); }); Content <div
Header div on top of the 3 columns Height of all columns must fill
I'm having a few alignment issues with Tumblr. I'm trying to align a header
header $id = intval($_GET['id']); $query = mysql_query(SELECT * FROM table WHERE id = $id);

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.