Dynamically change the stylesheet of a page using javascript/jquery :

We may come across some situations where we need to change the stylesheet of the page dynamically.
This sort of situations arise when we want to give our users more customization(UI). We can acheive that either with javascript or jquery:

                 $("link").attr("href", relativePathOfTheStyleSheet);

                   Eg:   $("link").attr("href","~/Site.css");

No comments:

Post a Comment