Reputation: 23
I cannot find a difference in code or settings but one does what I want and the other does not.
https://jsfiddle.net/Lr5c8vtb/2/
HTML
<button data-dojo-type="dijit/form/Button" data-dojo-props="label: 'gugu'">My Button</button>
<br><br>
<input type="checkbox" id="dbox1" checked
data-dojo-type="dijit/form/CheckBox">
<label for="dbox1">Want</label>
Javascript
require(["dojo/parser"], function(parser) {
});
vs
https://jsfiddle.net/2mnm8py2/1/
HTML
<button data-dojo-type="dijit/form/Button" data-dojo-props="label: 'gugu'">My Button</button>
<br><br>
<input type="checkbox" id="dbox1" checked
data-dojo-type="dijit/form/CheckBox">
<label for="dbox1">Want</label>
Javascript
require(["dojo/parser"], function(parser) {
});
Upvotes: 1
Views: 95
Reputation: 416
The external references (CSS files) are not being properly referenced in the first link.
Refrences should be:
http://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/resources/dojo.css
https://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dijit/themes/claro/claro.css
Upvotes: 4
Reputation: 69993
The external resources the jsFiddle is loading are different.
Open up your browser console and it will tell you whats wrong
"NetworkError: 404 Not Found - https://fiddle.jshell.net/Lr5c8vtb/2/show/claro.css"
"NetworkError: 404 Not Found - https://fiddle.jshell.net/Lr5c8vtb/2/show/dojo.css"
The working fiddle is referencing Google's hosted version of the files
http://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/resources/dojo.css
https://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dijit/themes/claro/claro.css
Upvotes: 2