Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Commit

Permalink
Include for existing targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre Koc committed Jun 9, 2017
1 parent 657e823 commit becf68a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/navigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* navigate.js
* Animated navigation on one-pagers using anchors.
*
* @version 1.0.4
* @version 1.0.5
* @author Emre Koc <[email protected]>
*/
'use strict';
Expand Down Expand Up @@ -58,7 +58,7 @@ function init(opts) {
if (!item.id) {
item.target = $body;
} else {
item.target = $(item.hash);
item.target = $(item.hash + ', #' + options.prefix + item.id);
if (!item.target.data('navigate')) {
item.target.data('navigate', item);
if (options.history) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "navigate.js",
"version": "1.0.4",
"version": "1.0.5",
"description": "Animated navigation on one-pagers using anchors.",
"main": "dist/navigate.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/navigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function init(opts) {
if (!item.id) {
item.target = $body;
} else {
item.target = $(item.hash);
item.target = $(item.hash + ', #' + options.prefix + item.id);
if (!item.target.data('navigate')) {
item.target.data('navigate', item);
if (options.history) {
Expand Down

0 comments on commit becf68a

Please sign in to comment.