Good afternoon, I am experimenting with CurlJS and have been successful in most subjects. However, for some reason, I still cannot load the CSS file using CurlJS .
Firebug (net tab) shows their plugin css.jsas downloadable: which I assume is used to load CSS files. Firebug (console tab) shows that "a.load is not a function" from the file curl.js.
Version number for define.amd.curl: "0.6.2"
My question is: Why is the CSS file loading not loading?
MY CODE LOOKS LIKE:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
curl =
{
baseUrl: '.',
paths:
{
curl: 'Scripts/Curl'
},
pluginPath: 'Scripts/Curl/curl/plugin'
};
</script>
<script src="Scripts/Curl/curl.js" type="text/javascript"></script>
<script type="text/javascript">
curl(['css!Style/Test.css'])
.then(
function (css) {
if (css)
alert("It Works!");
},
function (error) {
alert("It failed!");
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="test" style="border: 1px solid black; text-align: center; width: 400px;">
If the CSS loads this text will be RED.
</div>
</form>
</body>
</html>
CONSOLE TAB:

NET TAB:

:
JavaScript CSS , Curls.
var head = document.getElementsByTagName('head')[0];
var files = ['/Style/Test.css'];
for (var i = 0, l = files.length; i < l; i++) {
var link = document.createElement('link');
link.href = files[i];
link.rel = "stylesheet";
link.type = "text/css";
head.appendChild(link);
}