Skip to content

Commit

Permalink
Fix 'Anchor with href="#" returns error'. Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
ixkaito committed Apr 23, 2019
1 parent b96610c commit fc80616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions jquery.smoothscroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
/**
* @preserve
* jquery.smoothscroll.js - jQuery plugin to animate scrolling to anchor links
* Version 1.0.4 (Aug 19, 2017)
* Copyright 2017 Kite - https://github.com/ixkaito
Expand Down Expand Up @@ -30,7 +31,7 @@
) {
// Figure out element to scroll to
var hash = this.hash;
var $target = $(hash);
var $target = hash ? $(hash) : $('html');
$target = $target.length ? $target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if ($target.length) {
Expand Down
9 changes: 3 additions & 6 deletions jquery.smoothscroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc80616

Please sign in to comment.