jQuery Plugin For Switching Alternate CSS Files - getCSS

jQuery Plugin For Switching Alternate CSS Files - getCSS
File Size: 4.93KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

getCSS is a jQuery plugin for dynamically loading of external CSS files that allows your user to switch between alternate CSS (Cascading Style Sheets) and themes.

Basic Usage:

1.  Include jQuery library and jQuery getCSS in the header of your web page

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="jquery.getCSS.js"></script>

2. Create a link to apply a alternate CSS file on your page

<a id="applyCSS" href="#">applyCSS</a>

3. Initialize the plugin

<script type="text/javascript">
apply = document.getElementById("applyCSS");
apply.onclick = function(e) {
     e.preventDefault();
     $.getCSS("getCSS.css");
}
</script>

This awesome jQuery plugin is developed by intesso. For more Advanced Usages, please check the demo page or visit the official website.