0

I have a sticky sidebar but can't make it go to the bottom of the page when a media query is triggered.

It's working really well on desktop, but when resizing the page it will have a fixed position in top of everything.

<script>$.lockfixed("#spot_menu",{offset: {top: 0, bottom: 300}});</script>

I want it to have a relative position but CSS media query wont work in my media query:

#spot_menu { position: relative; }

Any idea of how to do this? Thank you

Gibson
  • 2,055
  • 2
  • 23
  • 48

1 Answers1

0

Something like (where x is the value you are checking against):

var height = $(window).height();

if(height === x) {
  ...
}

You could also use $(window).width() depending on what you are measuring.

ewizard
  • 2,801
  • 4
  • 52
  • 110