Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shimondoodkin/style.js
$style.js - a tiny css loader
https://github.com/shimondoodkin/style.js
Last synced: 28 days ago
JSON representation
$style.js - a tiny css loader
- Host: GitHub
- URL: https://github.com/shimondoodkin/style.js
- Owner: shimondoodkin
- Created: 2013-01-06T11:39:09.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-21T06:41:13.000Z (over 11 years ago)
- Last Synced: 2024-10-19T22:44:20.353Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
$style.js - a tiny css loader
========
It enables to load stylesheets dynamicaly from javascript.I used it to build single .js file embedable apps.
https://github.com/shimondoodkin/style.js
(c) Shimon Doodkin 2012
License: MIT
usage inside javascript:
```javascript
$style.url('/stylesheets/orders.css');
$style.url('http://123.123.123.123:5051/stylesheets/orders.css';
$style('.example {'+
' width : 90%;'+
' height: 90%;'+
' margin: 8px auto;'+
'} '+
//+'.item{border:1px solid lightgray;padding:10px;}'+
'')
```I have tested it with ie6 ie7 ie8 ie9 - it works with them. it does not work with ie5.5.
Also CSS that contain @import directive do not work in ie8 or less.
It works well in many other browsers
Related:
$script.js - a small async javascript loader: https://github.com/ded/script.js