Skip to main content

Bug Tracker

Side navigation

Ticket #4440: jstest.html
File jstest.html, 0.9 KB (added by bradcupit, March 27, 2009 10:37PM UTC)

test case for ticket 4440

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<!-- jQuery 1.3.1, 1.3.0, and 1.2.6 all work in IE 8, but 1.3.2 does not -->
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
		<script type="text/javascript">
			var visible = true;

			function toggleText() {
				if (visible) {
					$(".text").fadeOut("fast");
					visible = false;
				} else {
					$(".text").fadeIn("fast");
					visible = true;
				}
			}
		</script>
	</head>
	<body>
		<button onclick="toggleText()">Toggle Text</button>
		<table>
			<tr class="text">
				<td>This is the text that will be hidden/shown</td>
			</tr>
			<tr class="text">
				<td>more text</td>
			</tr>
		</table>
	</body>
</html>

Download in other formats:

Original Format