Skip to main content

Bug Tracker

Side navigation

Ticket #3977: bug.html
File bug.html, 0.6 KB (added by braddunbar, January 23, 2009 09:19PM UTC)

Using jQuery 1.3.1 rather than 1.3.0

<!doctype html>
<html>
<head>
</head>
<body>
	<div>
		<span class="foo">1</span>
		<span class="">2</span>
		<span class="">3</span>
		<span class="">4</span>
		<span class="">5</span>
	</div>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js"></script>
	<script type="text/javascript">
		jQuery(function($){
			var div = $('div');
			
			for(var i=0; i < 3; i++){
				var foo = $('.foo', div);
				alert(foo.text());
				foo.removeClass('foo').next().addClass('foo');
			}
		});
	</script>
</body>
</html>

Download in other formats:

Original Format