Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
smohadjer committed Mar 1, 2016
1 parent 0043d9e commit ab5bcc6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resourceLoader",
"homepage": "https://github.com/virtualidentityag/conditional-resource-loader",
"version": "0.0.7",
"version": "0.0.8",
"main": "resourceLoader.js"
}
4 changes: 2 additions & 2 deletions demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
</head>
<body>
<div class="demo1" data-init="(function($elm) { $elm.plugin(); })" data-resources="[{test: (function() {return true;}), paths: ['js/jquery.plugin.js', 'css/demo.css', 'css/demo1.css']}]">
This component's resources (css and js) are loaded via conditional loader! See logs in console...
This component's resources (css and js) are loaded via conditional loader!
</div>

<div class="demo2" data-init="(function($elm) { $elm.plugin(); })" data-resources="[{paths: ['js/jquery.plugin.js', 'css/demo.css']}, {paths: ['css/demo2.css'], base: '##content'}]">
This component's resources (css and js) are loaded via conditional loader! See logs in console...
This component's resources (css and js) are loaded via conditional loader!
</div>
</body>
</html>
2 changes: 0 additions & 2 deletions resourceLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function resourceLoader(options) {
type: 'text/css',
href: url
}).on('load', function() {
console.log(url + ' loaded');
cssCounter++;
checkIfComplete();
}).on('error', function() {
Expand All @@ -100,7 +99,6 @@ function resourceLoader(options) {
dataType: 'script',
cache: true
}).done(function() {
console.log(url + ' loaded');
jsCounter++;
checkIfComplete();
}).fail(function () {
Expand Down
2 changes: 0 additions & 2 deletions resourceLoader.min.js

This file was deleted.

0 comments on commit ab5bcc6

Please sign in to comment.