Skip to main content

Bug Tracker

Side navigation

Ticket #1054: toggleTest.html

File toggleTest.html, 1.3 KB (added by joelbirch, March 17, 2007 01:32AM UTC)

Test html page with test code embedded. It links to my server for CSS and jQuery 1.1.2

<html lang="en">
		<title>One/toggle test page</title>
		<meta name="description" content="test page">
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<link rel="stylesheet" type="text/css" href="" media="screen,print">
		<script type="text/javascript" src=""></script>
		<script type="text/javascript">
				$("button").one("click",function() {
					//change button behaviour to toggle pause/resume
					$(this).text("Run toggle 1").toggle(
						function() { $(this).text('Run toggle 2') },
						function() { $(this).text('Run toggle 1') }
		<h1>One/toggle <small>test page</small></h1>
		<h3>Inconsistant cross-browser behaviour</h3>
			<p>After one click the behaviour of this button is changed to toggle between two functions. IE toggles between them in the wrong order. Firefox will display the button label as &#8220;Run toggle 1&#8221; first, whereas IE displays the label as &#8220;Run toggle 2&#8221; and makes good on its threat to do so.&#160;<button>Run the &#8220;one&#8221; function</button></p>

Download in other formats:

Original Format