
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
fancy-dropdown
Advanced tools
  
A small jQuery-based library that allows you to create a relatively more style-able dropdown.
Import the CSS and JS alongwith jQuery.
<!-- The import methods may vary but in case of vanilla HTML, for example: -->
<link rel="stylesheet" href="node_modules/fancy-dropdown/css/index.css">
...
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="node_modules/fancy-dropdown/js/index.js"></script>
Add the class fancy-dropdown and the options passed to a readonly input field like so:
<input type='text' class='fancy-dropdown' data-fd-options="['foo', 'bar']" readonly />
and it gets transformed into a slightly fancier looking dropdown that looks something like:
<div class="fancy-dropdown-wrapper">
<input type='hidden' name='fd_0' /> <!-- Contains the actual value -->
<input type='text' class='fancy-dropdown' readonly /> <!-- Contains the visible value -->
<div class="fancy-dropdown-options"> <!-- Contains the options -->
<ul class="options-list">
<li class="option-item" data-value="0">foo</li>
<li class="option-item" data-value="1">bar</li>
</ul>
</div>
</div>
The options can be passed through the data-fd-options that can either be an array or a JSON object like so:
<input type='text' class='fancy-dropdown' data-fd-options="{'top': 'teemo', 'mid': 'gangplank'}" name="favorite-champions" readonly />
Which converts the input field to:
<div class="fancy-dropdown-options">
<ul class="options-list">
<li class="option-item" data-value="teemo">top</li>
<li class="option-item" data-value="gangplank">mid</li>
</ul>
</div>
By default, FD sets a unique name attribute for the hidden input field that can be processed through a form but you can also set one explicitly by giving the input text field a name:
<input type='text' class='fancy-dropdown' data-fd-options="['arcane', 'cowboy bebop']" name="favorite-shows" readonly />
Which sets the hidden input field's name attribute:
<input type='hidden' name='favorite-shows' />
None for now
MIT
FAQs
  
We found that fancy-dropdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.