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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -