最近搜索


没有最近搜索

dave's Avatar

dave

已加入2021年4月16日

·

最后活动2021年10月27日

关注

0

关注者

0

活动总数

3

投票

0

订阅

1

活动概览

的最新活动 dave

dave 进行了评论,

社区评论 Discussion - Tips and best practices from the community

Hi -  can anyone share the latest working TOC js?   I'm still having issues with it executing within the custom theme.  Is it picking up jquery properly?   I also see an 'unexpected end of script error' but all brackets and such are correct.  Is something else happening?  Dave

查看评论 · 已于 2017年10月14日 发布 · dave

0

关注者

0

投票

0

评论


dave 进行了评论,

社区评论 Discussion - Tips and best practices from the community

Hi -  Has anyone created a TOC w/o errors?  I'm having problems with the script not recognizing all header tags and also creating run-on hierarchies like that depicted below.  Is there an updated, tested script?  Also, it seems to be hit-and-miss in executing.   Anything missing in the first few JS lines?  Anything required in the document head or header templates?  Thanks.  Dave

/*
* jQuery v1.9.1 included
*/
$(document).ready(function() {
var $headers = $('.article-body h1');

if ($headers.length > 1) {

--------------------------

 

 

查看评论 · 已于 2017年9月08日 发布 · dave

0

关注者

0

投票

0

评论