Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-dropdowns

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-dropdowns - npm Package Compare versions

Comparing version 4.6.0 to 4.7.0

10

dist/js/jquery.prettydropdowns.js
/*!
* jQuery Pretty Dropdowns Plugin v4.6.0 by T. H. Doan (http://thdoan.github.io/pretty-dropdowns/)
* jQuery Pretty Dropdowns Plugin v4.7.0 by T. H. Doan (http://thdoan.github.io/pretty-dropdowns/)
*

@@ -22,3 +22,3 @@ * jQuery Pretty Dropdowns by T. H. Doan is licensed under the MIT License.

oOptions.selectedMarker = ' <span aria-hidden="true">' + oOptions.selectedMarker + '</span>';
oOptions.selectedMarker = ' <span aria-hidden="true" class="checked">' + oOptions.selectedMarker + '</span>';
// Validate options

@@ -126,7 +126,7 @@ if (isNaN(oOptions.height) || oOptions.height<8) oOptions.height = 8;

if (bMultiple) {
if ($li.children('span').length) $li.children('span').remove();
if ($li.children('span.checked').length) $li.children('span.checked').remove();
else $li.append(oOptions.selectedMarker);
// Sync <select> element
$dropdown.children(':not(.selected)').each(function(nIndex) {
$('optgroup, option', $select).eq(nIndex).prop('selected', $(this).children('span').length>0);
$('optgroup, option', $select).eq(nIndex).prop('selected', $(this).children('span.checked').length>0);
});

@@ -336,3 +336,3 @@ // Update selected values for multi-select menu

if (elOpt.parentNode.nodeName==='OPTGROUP') sGroup = elOpt.parentNode.getAttribute('label');
sText = elOpt.text;
sText = (elOpt.getAttribute('data-prefix') || '') + elOpt.text + (elOpt.getAttribute('data-suffix') || '');
break;

@@ -339,0 +339,0 @@ case 'OPTGROUP':

{
"name": "pretty-dropdowns",
"version": "4.6.0",
"version": "4.7.0",
"description": "A simple, lightweight jQuery plugin to create stylized drop-down menus.",

@@ -5,0 +5,0 @@ "keywords": [

# jQuery Pretty Dropdowns
Pretty Dropdowns is a simple, lightweight jQuery plugin that converts `<select>` drop-down menus into "pretty" menus that you can style using CSS.
Pretty Dropdowns is a simple, lightweight jQuery plugin that converts `<select>` drop-down menus into "pretty" menus that you can skin using CSS.

@@ -8,5 +8,6 @@ ### Features:

- Two arrow styles and sizes to choose from (or add your own style)
- Easily add icons, thumbnails, and other custom HTML to the menu items
- Support for multiple-select lists (`<select multiple>`)
- Support for option groups (`<optgroup>`)
- Tooltips (`title`) carried over at both `<select>` and `<option>` levels
- Tooltips (`title`) carried over at `<select>`, `<option>`, and `<optgroup>` levels
- Full keyboard navigation (you can even go directly to a menu item by typing its text)

@@ -84,2 +85,6 @@ - Auto-linked to `<label for>` (menu will get focus when you click on the label)

## Data Attributes
The `data-prefix` and `data-suffix` attributes can be added to the `<option>` elements to insert custom HTML before and after each menu item, respectively. You can make use of these attributes to add icons, thumbnails, badges, etc. to the menu items. A good example can be seen [in the demo](https://thdoan.github.io/pretty-dropdowns/demo.html#example-spell).
## Keyboard Navigation

@@ -86,0 +91,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc