I am trying to create a dropdown menu which is same as the image below.
.
<div class="dropdown dropdown-select signup-dd"> <button class="btn btn-default dropdown-toggle signup-btn" type="button" id="dropdownMenu1" data-toggle="dropdown" aria- expanded="true"> Select Title <span class="caret downarrow-signup"></span> </button> <ul class="dropdown-menu ul-signup" role="menu" aria-labelledby="dropdownMenu1"> <%# @themes.each do |t| %> <li role="presentation" class="dd-li"> <a role="menuitem" tabindex="-1" href="javascript:void(0);" onclick="$('#dropdownMenu122').text('Mr.');$('#user_title').val('<%="Mr."%>');" ><%="Mr."%></a></li> <li role="presentation" class="dd-li" > <a role="menuitem" tabindex="-1" href="javascript:void(0);" onclick="$('#dropdownMenu122').text('Ms.');$('#user_title').val('<%="Ms."%>');"><%="Ms."%></a></li> <li role="presentation" class="dd-li"> <a role="menuitem" tabindex="-1" href="javascript:void(0);" onclick="$('#dropdownMenu122').text('Mrs.');$('#user_title').val('<%="Mrs."%>');"><%="Mrs."%></a></li> <%# end %> </ul> </div> There's a border image and a seperator image which needs to be applied to the <ul> and <li> of the <select> for <dropdown>.
I am not able to trace down the issue. Probably completely confused with the number of classes and the property. Can someone help me hunt down the issue.
Here's the fiddle.
selectandoptionfor creating this?