Skip to main content

Search and Top Navigation

Ticket #4469: scratch.html
File scratch.html, 1.4 KB (added by mikecapp, April 14, 2009 01:02PM UTC)

Demonstrator

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
		<script type="text/javascript" src="jquery-ui-1.7.1.custom.min.js"></script>
		<script type="text/javascript">
			$(function() { $("#accordion")
				.accordion({header:"a"})
				.bind("accordionchange", function(event, ui) { 
					$("#result")
						.empty()
						.append("<p>.ui-accordion-content-active matches = " + $(".ui-accordion-content-active").length + "</p>")
						.append("<p>ui.oldHeader tagName = " + ui.oldHeader.get(0).tagName + "</p>")
						.append("<p>ui.newHeader tagName = " + ui.newHeader.get(0).tagName + "</p>")
						.append("<p>ui.oldContent tagName = " + ui.oldContent.get(0).tagName + "</p>")
						.append("<p>ui.newContent tagName = " + ui.newContent.get(0).tagName + "</p>")
						;
				}); 
			});
		</script>
	</head>
	<body>
		<div id="result" style="margin:16px; padding:16px; background:#ddf;">Nothing calculated yet</div>
		<div id="accordion">
			<div>
				<a href="#">First header</a>
				<div><p>This is a P wrapped in a DIV</p></div>
			</div>
			<div>
				<a href="#">Second header</a>
				<div><p>This is a P wrapped in a DIV</p></div>
			</div>
		</div>
	</body>
</html>

Download in other formats:

Original Format