Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/526#discussion_r54667932
  
    --- Diff: www/static/js/index.js ---
    @@ -145,17 +145,48 @@ $(document).ready(function () {
     
         // Smooth scroll to anchor links
         $("a[href^='#']").on('click', function(e) {
    -        if(this.hash) {
    +
    +        // scroll only if there is a hash in the href
    +        var hash = this.hash;
    +        if (hash) {
     
                 // prevent default anchor click behavior
                 e.preventDefault();
     
    -            // store hash
    -            var hash = this.hash;
    +            // get the fragment without the "#" symbol
    +            var targetName = hash;
    +            if (targetName[0] === "#") {
    --- End diff --
    
    I guess the condition will never fail as long as browsers obey the 
standard. I'll remove the check.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to