Reputation: 658
I have a beginner's problem with jquery UI script not loading. Basically I am trying to make some checkboxes as buttons but this is not working when I declared jquery UI script like this:
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<input type="checkbox" id="check" /><label for="check">Toggle</label>
<div id="format">
<input type="checkbox" id="check1" /><label for="check1">B</label>
<input type="checkbox" id="check2" /><label for="check2">I</label>
<input type="checkbox" id="check3" /><label for="check3">U</label>
</div>
http://jsfiddle.net/ftraian/cu8mS
Upvotes: 0
Views: 236
Reputation: 21785
See your modified Fiddle, I added jQuery and jQuery ui css http://jsfiddle.net/cu8mS/1/:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
Upvotes: 1
Reputation: 21191
jQuery UI doesn't include the core jQuery library. Add a reference to it before your jQuery UI reference.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
EDIT: It's worth noting that jsFiddle doesn't normally allow <script>
tags in the HTML section. It definitely is not executing the CDN request. If you check the UI checkbox and run the fiddle, the button styles kick in...
Upvotes: 1