gfranko / jquery.tocify.js

A jQuery Table of Contents plugin that can be themed with Twitter Bootstrap or jQueryUI.
http://gregfranko.com/jquery.tocify.js/
MIT License
928 stars 216 forks source link

AutoUpdate TOC whenever document headings changes #71

Closed mubaidr closed 4 years ago

mubaidr commented 9 years ago

+Added auto-update to the Table of Content when heading/content is changed/added or removed.

uses Mutation observer for changes monitoring for older browsers polling method is optional.

mubaidr commented 9 years ago

Also added method to manual update Table Of Content.

sman591 commented 9 years ago

@mubaidr Trying to search while having autoUpdate enabled throws errors (and causes the page to freeze due to the quantity of errors).

Uncaught TypeError: Cannot read property 'nodeName' of null

I might be mistaken, but glancing at how autoUpdate is intended, it's picking up that the Search feature is modifying the heading, and causing some sort of problem there?

https://github.com/mubaidr/jquery.tocify.js/blob/master/src/javascripts/jquery.tocify.js#L228

mubaidr commented 8 years ago

@sman591 I have implemented a fix for search functionality. Apparantly it was very small task.

jeremylynch commented 8 years ago

Can confirm this works. Would be great to get this merged.

qknight commented 1 year ago

Is this now merged? I can't find any code in the PR.