MarkUa

Untitled

May 3rd, 2020
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.06 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Create Course</title>
  6.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  7.     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  8. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  9. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  10.  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/css/selectize.css">
  11.     <script src="//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.js"></script>
  12. </head>
  13. <style>
  14.     #forma{
  15.         margin: 20px 20px 20px 20px;
  16.     }
  17.     .invisible {
  18.     position: absolute;
  19.     left: -9999px;
  20. }
  21.     </style>
  22.  
  23. <body>
  24.  
  25.   <div class="form-group" invisible >
  26.     <label for="exampleInputPassword1">Course categories</label>
  27.     <input type="text"  id="exampleInputPassword1" name = "tags" placeholder="Enter category" >
  28.       <small id="emailHelp" class="form-text text-muted">course categories tags that will helpful for course promotion.</small>
  29.  
  30.   </div>
  31.  
  32.  
  33.  
  34.  
  35.  
  36. </form>
  37.  
  38.             <script>
  39.                 var t = "ggg";
  40.             var $select =  $('#exampleInputPassword1').selectize({
  41.                 maxItems: 3,
  42.                 color: "blue",
  43.                 persist: false,
  44.                 plugins: ['remove_button'],
  45.                 values:[{text:'cat',value:'cat'},{text:'dog',value:'dog'},{text:'snake',value:'snake'}],
  46.                 create: function(input) {
  47.  
  48.                     return {
  49.                         value: input,
  50.                         text: input
  51.                     }
  52.                 },
  53.                  createFilter: function(input) { return input.length <= 10 ; },
  54.                onChange: function(value) {
  55.                  alert(  typeof $('#exampleInputPassword1')[0].selectize.items);
  56.               }
  57.           });
  58.           $( document ).ready(function() {
  59.  
  60.             $select[0].selectize.clear(); // Clear existing entries
  61.               for ( var i = 0 ; i < 1 ; i++ ) // data_source is a dynamic source of data
  62.               $select[ 0 ].selectize.createItem( "hello" , false ); // false means don't trigger dropdown
  63.                 $select[0].selectize.refreshOptions() ;
  64.    $select[0].selectize.addItem('First Item');
  65.               for (var i = 0; i < 100; i++) {
  66.                   var y = 'foo' + i.toString();
  67.                   $select[0].selectize.addOption({value: i, text: y});
  68.               }
  69.           });
  70.       </script>
  71. </body>
  72. </html>
Add Comment
Please, Sign In to add comment