Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="nl">
- <head>
- <meta charset="utf-8">
- <title></title>
- <style>
- .blue{
- color: blue;
- }
- </style>
- </head>
- <body>
- <button>Klik mij 1</button>
- <button>Klik mij 2</button>
- <button>Klik mij 3</button>
- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/jquery-3.1.1.min.js"><\/script>')</script>
- <script>
- $(document).ready(function(){
- var $button = $('button');
- $button.click(function(){
- console.log($(this).text());
- });
- $button.mouseover(function(){
- $(this).addClass('blue');
- });
- $button.mouseout(function(){
- $(this).removeClass('blue');
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement