Hi Enrique Paul,
Glad to hear that you read my posts :)
You can read my Tip for TOC also:
https://support.zendesk.com/hc/en-us/community/posts/4408867942298-Tip-How-to-make-a-Table-Of-Contents-TOC-For-Article-Template
And if any confusion feel free to ask.
Thanks
Thankyou, that worked for me. I have one more query, how can I add external url to my table of content links?
@enrique12,
I have one more query, how can I add external url to my table of content links?
Solution:
$(document).ready(function() { $("#toc").toc({content:".article-body", headings:"h1,h2,h3,h4,h5,h6"}); // External URL - Start $("#toc li:first-child a").attr("href", "http://www.google.com/"); $("#toc li:nth-child(2) a").attr("href", "amazon.com"); $("#toc li:nth-child(3) a").attr("href", "yahoo.com/"); // End});
But, why do you wanna external URL in TOC items? :)
Do you wanna link accordion panel-body to TOC items, am I right? :)
Thanks and yes you guess that right.😊
I am adding my HTML code and this is not working. Why?
For article's source code:-
Check the box 'Display unsafe content' in the Guide setting > Security section.
By the way, HTML always works but you can try this option if uncheck the box in your Guide settings.
If issue is not which I mentioned then share complete query.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.