New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 1.0.0 to 1.0.6

17

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

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

var $this = $(this);
if ($this.data('loaded') || $this.hasClass('plain')) return true; // Continue
if ($this.data('loaded')) return true; // Continue
// NOTE: $this.css('margin') returns empty string in Firefox.
// See https://github.com/jquery/jquery/issues/3383
var nWidth = $this.outerWidth(),
sHtml = '<ul title="' + $this.attr('title') + '" style="margin:'
sHtml = '<ul' + ($this.attr('title')?' title="'+$this.attr('title')+'"':'') + ' style="margin:'
+ $this.css('margin-top') + ' '

@@ -37,5 +37,6 @@ + $this.css('margin-right') + ' '

var $dropdown = $('ul', $this.parent()),
nWidth = $dropdown.width();
nWidth = $dropdown.outerWidth(true),
nOuterWidth;
// Calculate width if initially hidden
if (!nWidth) {
if ($dropdown.width()<=0) {
var $clone = $dropdown.parent().clone().css({

@@ -46,3 +47,5 @@ position: 'absolute',

$('body').append($clone);
nWidth = $('ul', $clone).width();
nWidth = $('ul', $clone).outerWidth(true);
$('li', $clone).width(nWidth);
nOuterWidth = $('ul', $clone).outerWidth(true);
$clone.remove();

@@ -78,5 +81,5 @@ }

$dropdown.on('mouseleave', resetDropdown);
$dropdown.parent().width(nWidth+1).removeClass('loading');
$dropdown.parent().width(nOuterWidth||$dropdown.outerWidth(true)).removeClass('loading');
});
};
}(jQuery));
{
"name": "pretty-dropdowns",
"version": "1.0.0",
"version": "1.0.6",
"description": "A simple, lightweight jQuery plugin to create stylized drop-down menus.",

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

@@ -31,4 +31,2 @@ # jQuery Pretty Dropdowns

If you don't want to convert a `<select>` element into a pretty drop-down menu, then give it a `plain` class.
## Installation

@@ -35,0 +33,0 @@

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