• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

How do I use jquery to change every instance of "font-family: 'Arapey',sans-serif;" to "font-family: 'Arapey',serif;" in runtime?

Hi all,

could someone please tell me how I could use jquery to change every instance of "font-family: 'Arapey',sans-serif;" to "font-family: 'Arapey,serif';" in runtime on my page by force (maybe also with an ! important at the end)?

For some annoying reason in my wordpress site when I choose google font arapey it appends "sans-serif" at the back of it, which is completely wrong as it is a "serif" font and I want it like that.

thanks in advance
0
badwolfff
Asked:
badwolfff
  • 2
1 Solution
 
GaryCommented:
Are these inline styles?
If not you would have to investigate the css of every element and change the inline style to the font.
Not recommended.

Might be easier to give us a link to the site to see what the problem is
0
 
badwolfffAuthor Commented:
Yes they are inline styles
thanks for your message
0
 
GaryCommented:
Try this in your document ready function

http://jsfiddle.net/GaryC123/ggF62/

$('[style*=Arapey]').each(function(){
  $(this).css("font-family","'Arapey',serif")  
})

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now