# Styling backup fonts with javascript or jquery

**URL:** <https://forum.kirupa.com/t/styling-backup-fonts-with-javascript-or-jquery/332368>\
**Category:** web dev\
**Created:** [May 10, 2014, 11:00pm UTC](https://forum.kirupa.com/t/styling-backup-fonts-with-javascript-or-jquery/332368 "2014-05-10T23:00:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leisuresuitlissy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/leisuresuitlissy/32/2109_2.png) [@leisuresuitlissy](https://forum.kirupa.com/u/leisuresuitlissy)\
**Post date:** [May 10, 2014, 11:00pm UTC](https://forum.kirupa.com/t/styling-backup-fonts-with-javascript-or-jquery/332368/1 "2014-05-10T23:00:16Z")

</div>

Hi all, I am using a small font for a primary nav, but when it doesn’t load, the backup font that replaces it is enormous. I can’t not use the small font as it’s part of my work’s branding, and no other default fonts are even remotely similar. Does anyone know how to do set a class using Javascript or Jquery to the backup font?

Thanks
