jQuery-One-Page-Nav

Smooth scrolling and smart navigation when user scrolls on one-page sites.

  • 所有者: davist11/jQuery-One-Page-Nav
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

A lightweight jQuery plugin for the navigation on one-page sites. Adds smooth scrolling when clicking on the navigation and automatically selects the correct navigation items as you are scrolling through the different sections.

The plugin still works even if you add additional content to the page after the fact that changes the position of each section.

Sample Markup:

Example Usage with Defaults:

If you want the hash to change when a user clicks on the navigation, then change the changeHash options to true.

If you want to filter items out of your navigation then pass in a selector to the filter option.

Filter Example:

Offset

In a previous version, there was an offset option to pass into the JavaScript. This was abandoned in favor of a CSS-only solution which simplified the code and makes it easier to handle responsively. Example

If you are having issues with iOS devices

If clicking a link in the nav makes the rest of the links unclickable until you scroll, you can solve it in this hacky way:

Found the solution here

主要指標

概覽
名稱與所有者davist11/jQuery-One-Page-Nav
主編程語言HTML
編程語言CSS (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2010-09-26 03:31:51
推送於2020-09-16 12:22:56
最后一次提交2017-12-08 15:48:23
發布數2
最新版本名稱v3.0.0 (發布於 2014-03-07 21:58:15)
第一版名稱v2.2.0 (發布於 2013-04-12 15:24:40)
用户参与
星數1.5k
關注者數85
派生數498
提交數43
已啟用問題?
問題數135
打開的問題數33
拉請求數2
打開的拉請求數17
關閉的拉請求數22
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?