MCPcopy Index your code
hub / github.com/TruthHun/BookStack / active_readed_menu

Function active_readed_menu

static/js/bookstack.js:158–174  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

156}
157
158function active_readed_menu(url){
159 var links=$(".article-menu-detail a");
160 var href ="";
161 $.each(links,function () {
162 href=$(this).attr("href");
163 if (href==url) {
164 $(this).addClass("jstree-clicked");
165 $(this).parents().removeClass("collapse-hide")
166 $(this).parent().addClass("readed");
167 }else{
168 $(this).removeClass("jstree-clicked");
169 }
170 });
171 var offset_top=$(".article-menu-detail a.jstree-clicked").offset().top;
172 var scroll_top =$('.article-menu').scrollTop();
173 $('.article-menu').animate({scrollTop:scroll_top+offset_top-180}, 300);
174}
175
176function pre_and_next_link(){
177 //上一篇和下一篇的链接

Callers 1

load_docFunction · 0.85

Calls 1

$Function · 0.50

Tested by

no test coverage detected