Comments (1)
You've set the default behavior for all links to open in a new window, and the generated table of contents respects that. If you want the links to navigate around the same page, then either add target=_self
to all of the anchors in the TOC and the anchors injected into the page, or remove the code you put in that changes the default behavior of the page. http://www.w3schools.com/jsref/prop_anchor_target.asp
And yes, you can use any fonts you'd like. There's nothing stopping you from that :D You'd implement that in other places though, it wouldn't be done by the table of contents generator. The directions for that thing you mention says you need your font files, upload them to their website, and then they'll generate some javascript for you. Then you just add the scripts to your page like they show in the directions. https://github.com/sorccu/cufon/wiki/Usage Test it out, put all the generated scripts and some html page into a folder together and then open it with your browser. Once you have the page opened, push the f12 key and look at the "network" tab. Refresh the page and you should see an entry show up that tells you whether or not the scripts were found and loaded. If they were found and loaded, then you can experiment on your page until you figure out what you want to do. To make the fonts effective on the table of contents, it looks like you'd need to edit the script where it says Cufon.replace
, just tell it Cufon.replace('*[id*="toc"]');
and it should change the font on anything that has an id that has "toc" in it anywhere. You could also just tell it Cufon.replace('*');
and it should change the font on the whole page. http://www.w3schools.com/cssref/sel_attr_contain.asp You can test out things in your page by switching the developer tools to the Console tab and typing in some different Cufon.replace
commands, just refresh the page and it will all reset back to whatever you have saved in your html file... and then you can try other codes.
Firefox's Developer Console's Console tab :
Firefox's Developer Console's Network tab :
I'm going to close this issue but you can email me if you have questions about web development. I'll show you different tools and things if you're trying to learn this stuff.
from html-table-of-contents.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-table-of-contents.