ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/a.php

<div class="custom-select">



  <select id="mySelect">
    <option value="option1">Option 1</option>
    <option value="option2">Option 2</option>
    <option value="option3">Option 3</option>
    <!-- Add more options as needed -->
  </select>
  
  
  
  <div class="select-styled">Select an option</div>
  <ul class="select-options">
    <!-- Options will be added dynamically using jQuery -->
  </ul>
</div>

<style>
    .custom-select {
      position: relative;
      width: 100%;
    }

.select-styled {
  padding: 10px;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  cursor: pointer;
}

.select-options {
  position: absolute;
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  display: none;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
}

.select-option {
  padding: 8px;
}

.select-option:hover {
  background-color: #ddd;
}

</style>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
  // Hide the original select element
  $('#mySelect').hide();

  // Populate the custom select options
  $('#mySelect option').each(function() {
    var value = $(this).val();
    var text = $(this).text();
    
    var row = `<div class="row select-option" data-value="` + value + `">
                <div class="col-md-6">
                    02:54 AM
                </div>
                <div class="col-md-6">
                    `+ text + `
                </div>
                <div class="col-md-6">
                    45-76-2023
                </div>
                <div class="col-md-6">
                    Address
                </div>
            </div>`;
    
   // $('.select-options').append('<li class="select-option" data-value="' + value + '">' + text + '<br>lsoixuhj</li>');
     $('.select-options').append(row);
  });






  // Handle click events on the custom select
  $('.select-styled').click(function(e) {
    e.stopPropagation();
    $('.select-options').toggle();
  });

  // Handle click events on custom select options
  $('.select-option').click(function() {
    var value = $(this).data('value');
    var text = $(this).text();
    $('#mySelect').val(value);
    $('.select-styled').text(text);
    $('.select-options').hide();
  });

  // Hide the custom options when clicking outside the select
  $(document).click(function() {
    $('.select-options').hide();
  });
});
</script>

Zerion Mini Shell 1.0