Apply font-family using jQuery


/ Published in: jQuery
Save to your folder(s)

As you can see you need to add backslash and apostrophe => \' to font family with space between. If there isn't spaces in font name just use double apostrophes, e.g. "Lucida Grande"


Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. $("body #results p").css("font-family","\'Lucida Grande\'");
  3. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.