Skip to content

Instantly share code, notes, and snippets.

@fearofcode
Created September 6, 2011 23:06
Show Gist options
  • Save fearofcode/1199253 to your computer and use it in GitHub Desktop.
Save fearofcode/1199253 to your computer and use it in GitHub Desktop.
dicking around with jquery UI
<h2 class="demoHeaders">Radio buttons with icons</h2>
<div id="radioWithIcons">
<input type="radio" id="radio1" name="radio" /><label for="radio1"><img src="http://www.google.com/favicon.ico"/> Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2"><img src="http://www.yahoo.com/favicon.ico"/> Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3"><img src="http://www.fogcreek.com/favicon.ico"/> Choice 3</label>
</div>
<script type="text/javascript">
$(function(){
$("#radioWithIcons a").click(function(ev) { ev.preventDefault(); });
$("#radioWithIcons").buttonset();
$("#radioWithIcons").hover(function() { console.log("in") },
function() { console.log("out") } )
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment