jQuery UI Template

  • Post author:
  • Post category:JavaScript

Here’s a quick HTML template you can use to get started with jQuery UI. It uses Google Libraries API and already accounts for jQuery UI font sizes.

<!DOCTYPE html>
<html>
<head>
	<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet" />
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
    <style>
        body { font-size: 62.5%; }
    </style>
    <script>
        $(function() {
            $( "#dialog" ).dialog();
        });
    </script>
</head>
<body>
    <div id="dialog" title="Dialog">
    	<p>Hello World!</p>
    </div>
</body>
</html>

Here’s what it looks like in the browser.