Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
- <script>
- $(document).ready(function() {
- var $hiddenNo = $('.first');
- $hiddenNo.on('click', function (e) {
- console.log("fire");
- $(this).hide();
- $(this).next().show();
- });
- $('.number').toggle(function() {
- $(this).find('span').text('XXXX');
- }, function() {
- $(this).find('span').text($(this).data('last'));
- }).click();
- });
- </script>
- </head>
- <body>
- <p class="first">pierwszy</p>
- <p class="second" style="display: none">drugi</p>
- <p class="first">pierwszy</p>
- <p class="second" style="display: none">drugi</p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement