Plugin Directory

Changeset 1437903


Ignore:
Timestamp:
06/16/2016 03:51:19 PM (10 years ago)
Author:
k00ni
Message:

fix bug, concerning wrong anchor name

anchor name was to long because the script took the whole
URL instead of the string after the #

Location:
fixed-menu-anchor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fixed-menu-anchor/trunk/fixed-menu-anchor.php

    r1415651 r1437903  
    88 * Plugin Name: Fixed Menu Anchor
    99 * Plugin URI: https://wordpress.org/plugins/fixed-menu-anchor
    10  * Version: 2.2
     10 * Version: 2.2.1
    1111 * Description: Having problems with a fixed header/menu which overlaps the target of an anchor? Use this plugin to jump just before the target so that the fixed header/menu does not overlap anymore.
    1212 * Author: Konrad Abicht, Marc Sauerwald
  • fixed-menu-anchor/trunk/js/fixed-menu-anchor.js

    r1395643 r1437903  
    5252function fixedMenuAnchor_getTopValueOfAnchorTarget(jQ, anchorLink)
    5353{
     54    var href = jQ(anchorLink).attr('href');
     55
    5456    // extract name of the anchor target (usually identified via ID or name).
    55     var anchorName = jQ(anchorLink).attr('href').substr(1);
     57    var anchorName = href.substr(href.indexOf("#")+1);
    5658
    5759    // try to find element using name
Note: See TracChangeset for help on using the changeset viewer.