javascript - Set entire page's css on click? -
does know how can change entire document's css file on click? i've searched around found few results on setting class/id's css, not entire document. website has 2 themes, light/dark, , want load "light.css" or "dark.css" 2 links.
thanks.
yeah, can using theming. changing of css limited <body>
tag.
$("a.theme").click(function(){ $("body").addclass("dark"); });
i have used jquery library make coding easier. , not idea switch css rather, can change classes.
demo
you can check out working demo in jsbin.
check out answer more details: selecting web page , feel without reloading, 1 css.
Comments
Post a Comment