I have the following two styles in a stylesheet that I do not have access to:
a:link {
font-size: 150%;
}
a:hover {
font-size: 150%;
}
Using jQuery, how can I change the font-size here to 100% for both a:link and a:hover.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@Phil is correct in his comment above, a rule can be added directly. A
<style/>element can be appended at runtime to<head/>which will trigger a page re-render (?) and the new styles will be applied! From the fiddle:For some reason the
headselector doesn’t look right to me but hey, it works! Hover over the link in 5 seconds time (for argument’s sake) and it’ll be styled.