Advertisement
koki2000

chat

Aug 10th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.20 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="style.css" rel="stylesheet">
  5. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  6. <script>
  7. $(document).ready(function(){
  8.     $("#chatbox_title").click(function(){
  9.         //alert("ch");
  10.         $('#chatbox_body').toggle();
  11.     });
  12.    
  13.     $("#chatbox_body li").click(function(){
  14.         //$(this).toggleClass("active");
  15.         //$(this).attr('id', this).text;
  16.         alert($(this).attr('id'));
  17.     });
  18. });
  19. </script>
  20. <title>chatbox</title>
  21. </head>
  22. <body>
  23. <div class="container">
  24.     oldal tartalma
  25. </div>
  26.     <div id="chatbox_head" class="chatbox_head">
  27.         <p id="chatbox_title">Chat</p>
  28.        
  29.         <div id="chatbox_body" class="chatbox_body">
  30.             <?php
  31.                 $users=array("Csaba", "Zoli", "Gabi", "Pista", "Elemér", "Róza", "Sanyi", "Lacus", "Kriszti", "Erika", "Nóra", "Mária", "Ildikó", "Ernő", "Rozi", "Jakab", "Gipsz", "Péter", "Tamás", "Sándor", "Richard", );
  32.                 $num_users=count($users);
  33.                 sort($users); //!
  34.                 for($u=0; $u<$num_users; $u++){
  35.                     //echo "<p id='$u'>$users[$u]</p>";
  36.                     echo"<ul>
  37.                         <li id='$u'>$users[$u]</li>
  38.                     </ul>";
  39.                 }
  40.             ?>
  41.         </div>
  42.         <div class="messbox">
  43.  
  44.         </div>
  45.     </div>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement