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

  • Home
  • SEARCH
  • 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 6913847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:16:11+00:00 2026-05-27T09:16:11+00:00

new to jquery here but I’m trying to learn some different stuff that’s been

  • 0

new to jquery here but I’m trying to learn some different stuff that’s been done on websites I frequent.

One such case that I can’t figure out, is how to create a drop shadow for a fixed positioned header, so that when you scroll a drop shadow appears under the header and then disappears when you aren’t scrolling anything. Here’s the website I frequent that uses this technique http://www.thisisluckyme.com

It doesn’t seem too complex but I can’t find much to go off of when trying to make this. Any help or insight into how its down would be very appreciated!

  • 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-27T09:16:12+00:00Added an answer on May 27, 2026 at 9:16 am

    Pretty simple. You just bind an event handler to the window’s scroll event, and check the position of the fixed header’s top. If it’s not 0, add the shadow. If it is 0, remove the 0.

    Working example: http://jsfiddle.net/3cRe5/

    the JS:

    var header = $('.header');
    
    $(window).scroll(function(e){
        if(header.offset().top !== 0){
            if(!header.hasClass('shadow')){
                header.addClass('shadow');
            }
        }else{
            header.removeClass('shadow');
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to use the new jquery-ui, and all but the resizable function
I'm new to jQuery. I've searched and found some results that might work, but
I'm very new to jquery and programming in general but I'm still trying to
I'm new to JQuery but for some reason I cant get the php code
New to jQuery here. I've found several web pages that come close to what
I'm new to jQuery but am hoping to replace a <div> with another that
I am somewhat new to Jquery but I feel complete failure here at not
I'm new to jquery, but I'm trying to use it to create a multi-step
When writing a new jQuery plugin is there a straightforward way of checking that
Using jQuery UI 1.8rc3 combined with the new jquery.effects.fade.js code, I've been able to

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.