Skip to content

Commit c6f3c29

Browse files
arthurvrRedWolves
authored andcommitted
events/basics: fix create button DOM element example
Closes jquerygh-587
1 parent ae976c7 commit c6f3c29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

page/events/event-basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $( document ).ready(function(){
4242
// Now create a new button element with the alert class. This button
4343
// was created after the click listeners were applied above, so it
4444
// will not have the same click behavior as its peers
45-
$( "button" ).addClass( "alert" ).appendTo( document.body );
45+
$( "<button class='alert'>Alert!</button>" ).appendTo( document.body );
4646
});
4747
```
4848

0 commit comments

Comments
 (0)