Advertisement
lemansky

Untitled

Apr 28th, 2021
920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.80 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Document</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  8.     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
  9.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
  10.     <script>
  11.         $(document).ready(() => {
  12.             let $btn = $('.btn');
  13.             $btn.click((e) => {
  14.                 let $value = $('.form-control').val();
  15.                 let $p = $('p');
  16.                 $p.each((index, element) => {
  17.                     if((index + 1) % $value == 0){
  18.                         $(element).addClass('d-none');
  19.                     } else {
  20.                         $(element).addClass('alert alert-info d-block')
  21.                     }
  22.                 });
  23.             });
  24.         });
  25.     </script>
  26. </head>
  27. <body>
  28.     <input type="text" class="form-control" placeholder="Въведете число"/>
  29.     <input type="button" class="btn btn-primary" value="Тествай">
  30.  
  31.     <p>This line of text is meant to be treated as fine print. 1</p>
  32.     <p>This line of text is meant to be treated as fine print. 2</p>
  33.     <p>This line of text is meant to be treated as fine print. 3</p>
  34.     <p>This line of text is meant to be treated as fine print. 4</p>
  35.     <p>This line of text is meant to be treated as fine print. 5</p>
  36.     <p>This line of text is meant to be treated as fine print. 6</p>
  37.     <p>This line of text is meant to be treated as fine print. 7</p>
  38.     <p>This line of text is meant to be treated as fine print. 8</p>
  39.     <p>This line of text is meant to be treated as fine print. 9</p>
  40.     <p>This line of text is meant to be treated as fine print. 10</p>
  41.     <p>This line of text is meant to be treated as fine print. 11</p>
  42.     <p>This line of text is meant to be treated as fine print. 12</p>
  43.     <p>This line of text is meant to be treated as fine print. 13</p>
  44.     <p>This line of text is meant to be treated as fine print. 14</p>
  45.     <p>This line of text is meant to be treated as fine print. 15</p>
  46.     <p>This line of text is meant to be treated as fine print. 16</p>
  47.     <p>This line of text is meant to be treated as fine print. 17</p>
  48.     <p>This line of text is meant to be treated as fine print. 18</p>
  49.     <p>This line of text is meant to be treated as fine print. 19</p>
  50.     <p>This line of text is meant to be treated as fine print. 20</p>
  51.  
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement