0

I want create dropdown list with line after each option tag value. current code is

    var myList = $("#ddlProcedure");
    myList .empty();
    myList .empty().append('<option  selected="selected" value="0">Select name</option>');
     myList .append('</hr>');
    for (var i = 0; i < response.Data.length; i++) {
       myList .append($('<option>/option>').val(response.Data[i].id).html(response.Data[i].name));
          
        myList .append('<hr/>');
   }

this code showing line after each name in dropdownlist but its not looking good so i want to apply css in


tag but it's notworking so if any one can help me how to achieve this.
Mohammad Ali Rony
  • 4,695
  • 3
  • 19
  • 33
kailash
  • 20
  • 5
  • Either add an `` or use a 3rd part select replacement such as [select2](https://stackoverflow.com/tags/jquery-select2/info) – freedomn-m Jul 16 '22 at 06:47
  • take a look at https://stackoverflow.com/questions/7208786/how-to-style-the-option-of-an-html-select-element there are lots of examples there of how to style including the styling your after – Patrick Hume Jul 16 '22 at 20:12

0 Answers0