Simple and easy to use JavaScript library to load your .css files
- Add styles.js in your HTML document:
<script type="text/javascript" data-css="css/folder/config-file" src="js/folder/styles.js"></script>
. - Create a
config-file.js
file in thecss/folder/
folder. - Finaly, to load
my-styles.css
fromcss/folder/
, simply addstyles.load('my-styles');
to theconfig-file.js
in the same folder.
Rasmus Burkal, @rabu81