Exploring Options
After investigating the use of .css()
to manipulate CSS properties of specific elements, I came across a website showcasing the following CSS:
body, table td, select {
font-family: Arial Unicode MS, Arial, sans-serif;
font-size: small;
}
Personally, I never favored the Arial Unicode
font. This led me to utilize Chrome's Style Inspector in order to change Arial Unicode MS
to something more preferable like Segoe UI
. Is there another approach that can achieve the same result without resorting to the following method?
Potential Solutions
$("body, table td, select").css("font-family", "Segoe UI");
- Recursively intensive and may impact performance.
- Ineffective when dealing with dynamically loaded content.
Consider Alternative Methods
$('<style>body, table td, select {font-famnily: "Segoe UI";}</style>')
.appendTo("head");
- Are there better alternatives available?
- Generates numerous
<style>
tags which may not be ideal.