Bug Tracker

Ticket #7040: jquerytest.html

File jquerytest.html, 441 bytes (added by peet, 9 years ago)

the first time clicked 1 event after that 2 events

Line 
1<html>
2<head>
3<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
4</head>
5<body>
6<div id="templatebodypage">
7<script>
8$(document).ready(function(){
9        $('#testbutton').bind('click',function(){
10                $('#templatebodypage').wrap("<center>");
11                alert("button clicked");
12                $('#templatebodypage').unwrap("<center>");
13        });
14});
15</script>
16<button id="testbutton">test</button>
17</div>
18</body>
19</html>