I have two CSS stylesheets, how do I toggle between them using a single onclick element?
The elements would be:
- stylesheet_a.css
- stylesheet_b.css
- a DIV element with ID of “css_toggle”
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.
This is the general idea:
click()event tocss_toggle–$('#css_toggle').click(event_handler);srcattribute of your stylesheetMore detail and code can be found in the following tutorial – http://frinity.blogspot.com/2008/06/switch-css-stylesheets-using-jquery.html