jgallen23 / toc

Table of Contents Plugin
http://projects.jga.me/toc/
MIT License
531 stars 111 forks source link

On Selected #50

Closed blpraveen closed 9 years ago

blpraveen commented 9 years ago

I want to handle on selected event . it is not working . What am I doing wrong?

              $('#pageContents').toc({ 
                      'smoothScrolling': function(target, options, callback) {
                        $(target).smoothScroller({
                          offset: options.scrollToOffset
                        }).on('smoothScrollerComplete', function() {
                        console.log('asds');
                        $('#pageContents').sly('toEnd', $('#pageContents').find('.toc-active'))
                            callback();
                        });
                     }
            });
blpraveen commented 9 years ago

Sorry, I wanted to use onHighlight function . i did wrong