Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- <title>add demo</title>
- <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
- </head>
- <body>
- <h1 class='Titulo'>Titulo</h1>
- <button title="Meu Novo Titulo">CLique aqui</button>
- <script>
- $('button').click(function(){
- var titulo = $(this).attr('title');
- $('.Titulo').text(titulo);
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement