Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Control the Firefox Scroll Position using the Web Console

Tags: firefox, web-development

This works with either Firebug or the Firefox built in developer tools.

  • Open Firebug.
  • Go to the console.
  • Use one of the following commands:
    • window.scrollTo(y, x) - Scroll to this position.
    • window.scrollBy(y, x) - Scroll this may pixels.
    • window.scrollX() - Get the current vertical position.
    • window.scrollY() - Get the current horizontal position.

This can be really helpful for troubleshooting the Bootstrap Scrollspy component.