Bold Links | JavaScriptSource

Bold Links

Calvin Leung Aug 20, 2007


This script will cause a link to appear in bold type after it is clicked. Good for frame navigation, as well as anchors on a page or in a div. Easy to use.

this is link 1
this is link 2
this is link 3
this is link 4
this is link 5
this is link 6


Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: boldLinks.js


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response


Sure, you can do it that way. But it is CSS, it's just inline.

Lee Nov 18, 2008

Is there a way to highlight the first link without using css?[br /]For example, can I do:[br /][br /] <a href="#" style="font-weight: 900;" onclick="turnBackBold (this);">link 1</a>[br /][br /]Thanks!

Ashley Nov 12, 2008

Place this in your CSS file:[br /][br /].boldLink &#91;[br /] font-weight: 900;[br /]}[br /][br /]Then add the class to the link:[br /][br /]<a href="#" class="boldLink" onclick="turnBackBold (this);">this is link 1</a><br>

Lee Nov 6, 2008

Great script. How could I ensure the first link shows up bold when the page is first loaded? Thanks!

Marco Oct 14, 2008

Yes, but you would need to re-write the script. If you need additional help, you'll need to post your question [a href=""]over on the forums[/a].

Lee Jun 26, 2008