troubleshooting Question

Scrolling left column

Avatar of Melody Scott
Melody ScottFlag for United States of America asked on
JavaScriptWeb DevelopmentHTML
10 Comments1 Solution61 ViewsLast Modified:
Hi, thanks to an expert here, I've almost got what I need here:

user name: pepe, pw: BobTheBuilder45!!

The left column starts to scroll at the right time, so I can still see the bottom item, Special Deals Page, while still seeing the top item, Gifts.

There are two problems I can't solve.

1. Once I start to scroll, there is a space above the words gift. I'd like to tighten that up. See screenshot space.jpg.
2. Depending on how far I scroll down the page, then scroll back up, the word Gifts might return to its proper place, or it might overlap the section above it, or there might be a big space. See screenshot gifts.jpg.

I've wrapped the part to scroll in <div id="scrollingDiv">, and the jquery is:
<script src="js/jquery-1.11.2.js"></script>

var $window = $(window);

function scrollMenu(){
  var pos = $window.scrollTop();
  if (pos > 255)
  $('#scrollingDiv').css('marginTop', (pos-290) + 'px');

$window.bind('scroll', scrollMenu);


Thanks, looking forward to your responses!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 10 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 10 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004