Skip to content

Commit

Permalink
Button performance test: Added alert for time to initialize.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Jul 16, 2010
1 parent 70481d9 commit b368491
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/visual/button/button_performance.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script> <script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
var start = +new Date();
$("button").button(); $("button").button();
var end = +new Date();
alert( "Time to initialize: " + (end - start) + "ms" );
}); });
</script> </script>
</head> </head>
Expand Down

1 comment on commit b368491

@jzaefferer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an alert? $("<div/>").text(bla).appendTo("body") is your friend.

Please sign in to comment.