KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Weird little snafu. I'm using jQuery's .css() method to change the size of text (long story; no, I can't use media queries) using a variable and I need to add em to it. I'm not sure what the syntax is because there are multiple values for the CSS change. To illustrate: This works perfectly. It adds em to the calculated value of victore : $('h1').css('font-size', victore + 'em'); This doesn't: $('h1').css({ 'font-size':victore + 'em', 'line-height':vignelli + 'em'; }); The em needs quotes... but so does the value. Wrapping it in parens didn't work
Tags (comma-separated)
Save Edits
Cancel