Subversion Repositories Sites.obs-saisons.fr

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
40 aurelien 1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
	<meta charset="UTF-8" />
5
	<title>jQuery UI Tabs - Content via Ajax</title>
6
	<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7
	<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
8
	<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9
	<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
10
	<script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
11
	<link type="text/css" href="../demos.css" rel="stylesheet" />
12
	<script type="text/javascript">
13
	$(function() {
14
		$("#tabs").tabs({
15
			ajaxOptions: {
16
				error: function(xhr, status, index, anchor) {
17
					$(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo.");
18
				}
19
			}
20
		});
21
	});
22
	</script>
23
</head>
24
<body>
25
 
26
<div class="demo">
27
 
28
<div id="tabs">
29
	<ul>
30
		<li><a href="#tabs-1">Preloaded</a></li>
31
		<li><a href="ajax/content1.html">Tab 1</a></li>
32
		<li><a href="ajax/content2.html">Tab 2</a></li>
33
		<li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li>
34
		<li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li>
35
	</ul>
36
	<div id="tabs-1">
37
		<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
38
	</div>
39
</div>
40
 
41
</div><!-- End demo -->
42
 
43
<div class="demo-description">
44
 
45
<p>Fetch external content via Ajax for the tabs by setting an href value in the tab links.  While the Ajax request is waiting for a response, the tab label changes to say "Loading...", then returns to the normal label once loaded.</p>
46
 
47
<p>Tabs 3 and 4 demonstrate slow-loading and broken AJAX tabs, and how to handle serverside errors in those cases. Note: These two require a webserver to interpret PHP. They won't work from the filesystem.</p>
48
</div><!-- End demo-description -->
49
 
50
</body>
51
</html>