Im trying to widgetize a group of radio buttons with jquery ui.
jquery and jquery-ui is loaded from googleapis. I've uploaded a ui theme and included the css file in the header. This is how I call the buttonset function:
<script type="text/javascript">
$(function() {
$("#color").buttonset();
});
</script>
And this is the markup
<form>
<div id="color">
<input type="radio" class="color" id="color1" name="color" value="green" checked="checked" /><label for="color1">Grøn</label>
<input type="radio" class="color" id="color2" name="color" value="red" /><label for="color2">Rød</label>
<input type="radio" class="color" id="color3"开发者_如何学Go name="color" value="white" /><label for="color3">Hvid</label>
</div>
</form>
The ui script only adds the ui-buttonset class to the #color container. But the radios wont convert into stylish buttons. Can someone see what im missing?
Bugger, after trying redownloading and uploading, isolating, proofreading and a few wasted hours - the original set up is working... still dont know what I was doing wrong :(
edit: Ok figured it out. It was the google hosted versions of jquery an jquery-ui that diddnt play nice with the themeroller theme. Works as intended with the bundled local versions.
精彩评论