/Hash-Link-Scroll-Offset

Offset the scroll position of anchored links. Handy if you have a sticky header that covers linked material.

Primary LanguagePHP

Hash Link Scroll Offset

Contributors: webdevstudios, jtsternberg
Donate link: http://webdevstudios.com
Tags: Requires at least: 3.6.0
Tested up to: 3.6.0
Stable tag: 0.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Offset the scroll position of anchored links. Handy if you have a sticky header that covers linked material.

Description

Often anchor links can be overachievers and can scroll a user past the section intended. This plugin attempts to change that by offering a setting that allows you to change the scroll offset when clicking anchors. It also adds a nice animated scrolling effect when clicking an anchor rather than the sudden jump that usually occurs. Even handles when visiting a hashed URL directly.

Use the no-scroll class on any hash links that are not meant to scroll to an area of the page (Navigation for sliders, etc).

Installation

Manual Installation

  1. Upload the entire /hash-link-scroll-offset directory to the /wp-content/plugins/ directory.
  2. Activate Hash Link Scroll Offset through the 'Plugins' menu in WordPress.
  3. Update the "Hash Link Scroll Offset" setting on the general settings page, http://YOURSITE.COM/wp-admin/options-general.php.

Changelog

0.1.2

  • Automatically compensate for admin bar. Props @salcode.

0.1.1

0.1.0

  • First release