How to change the theme in javascript?
I am trying to add theme on my web pages on button click, but i am unable to do it.
Would you please tell me how to do it?
I am trying to add theme on my web pages on button click, but i am unable to do it.
Would you please tell me how to do it?
DominickLo posted this at 17:17 — 30th December 2016.
They have: 11 posts
Joined: Aug 2016
You will have to modify existing JavaScript either replace with skin file or just add comments on them.
isarbjitgrewal posted this at 05:08 — 22nd August 2017.
They have: 8 posts
Joined: May 2017
You can set an Id to the link tag and switch the css at runtime.
HTML
JS
document.getElementById('buttonID').onclick = function () {
document.getElementById('theme_css').href = '../red.css';
};
Offshore Software Development Company | Best UI UX Design Agency | Web Development Company USA | Best PHP Web Development Company
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.