Skip to content

Commit

Permalink
Fix missing right border in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Doan committed Feb 12, 2017
1 parent 296aee7 commit 48ccec3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/js/jquery.prettydropdowns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery Pretty Dropdowns Plugin v3.1.1 by T. H. Doan (http://thdoan.github.io/pretty-dropdowns/)
* jQuery Pretty Dropdowns Plugin v3.1.2 by T. H. Doan (http://thdoan.github.io/pretty-dropdowns/)
*
* jQuery Pretty Dropdowns by T. H. Doan is licensed under the MIT License.
* Read a copy of the license in the LICENSE file or at
Expand Down Expand Up @@ -192,7 +192,8 @@
$clone.remove();
}
// Set dropdown width and event handler
$dropdown.children('li').width(nWidth).click(function() {
// Add 0.5px slack to prevent missing right border with scrollbar
$dropdown.children('li').width(nWidth+0.5).click(function() {
var $li = $(this);
// Only update if different value selected
if ($dropdown.hasClass('active') && $li.data('value')!==$dropdown.children('li.selected').data('value')) {
Expand Down

0 comments on commit 48ccec3

Please sign in to comment.