文章文档标题自动生成导航jQuery小插件titleNav.js

http://www.zhangxinxu.com/wordpress/2018/04/jquery-plugin-document-article-title-nav-js/
JS使用如下:

$('h3').titleNav();

需要下面的CSS配合:

.title-nav-ul {
    width: 200px;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: 1px 1px 3px rgba(0,0,0,.25);
    position: absolute;
    top: 200px; right: 10px;
}
.title-nav-li {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: inherit;
}
.title-nav-li.active {
    font-weight: bold;
}
.title-nav-li:hover {
    background-color: #f0f0f0;
}

Tips:You can change the code before run.

THE END
分享
二维码
打赏
< <上一篇
下一篇>>