soundasleep / jquery-dropdown

Bootstrap-style dropdowns with some added features and no dependencies.
Other
767 stars 268 forks source link

Creating more complex content for items #138

Open mehdizj2000 opened 5 years ago

mehdizj2000 commented 5 years ago

I am not expert in frontend development. For one of my projects I wanted to use a dropdown and fill it with multiple divs. as I checked the css I saw there are just label and a are defined to be accepted as items. I added some styles and it works for me.

I wanted to upload my changes but because I don't know any thing about sass and other frontend stuffs I add it here:

jquery.dropdown.zip

sample html code:

<div id="jq-dropdown-1" class="jq-dropdown jq-dropdown-relative">
  <ul class="jq-dropdown-content">
    <li>
      <div class="jq-dropdown-item">
        <div style="float: left; padding-right: 5px" class="some_img"></div>
        <div style="float:right; padding-left: 5x">name</div>
      </div>
     </li>
      <li>
      <div class="jq-dropdown-item">
        <div style="float: left; padding-right: 5px" class="some_img"></div>
        <div style="float:right; padding-left: 5x">name1</div>
      </div>
     </li>
      <li>
      <div class="jq-dropdown-item">
        <div style="float: left; padding-right: 5px" class="some_img"></div>
        <div style="float:right; padding-left: 5x">name2</div>
      </div>
     </li>
  </ul>
</div>