Skip to main content

Bug Tracker

Side navigation

Ticket #7040: jquerytest.html
File jquerytest.html, 0.4 KB (added by peet, September 16, 2010 08:09AM UTC)

the first time clicked 1 event after that 2 events

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
</head>
<body>
<div id="templatebodypage">
<script>
$(document).ready(function(){
	$('#testbutton').bind('click',function(){
		$('#templatebodypage').wrap("<center>");
		alert("button clicked");
		$('#templatebodypage').unwrap("<center>");
	});
});
</script>
<button id="testbutton">test</button>
</div>
</body>
</html>

Download in other formats:

Original Format