jquery button with icon

by Ronny Kumke

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/ui-lightness/jquery-ui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.js"></script>
<div id="dialog"></div>
<button>Test</button>

JavaScript

$(document).ready(function(){
    var aJson = '{"salutation": "Herr","firstname": "Jochen"}'; 
	$("#dialog").dialog({
    	autoOpen: false,
      	title: 'Test'
   	});
    $( "button" ).button().click(function( event ) {
    	$("#dialog").dialog('open').text('hallo <br /> Welt');
    });
})