From c0dd43f5d5dd349b179fb8c677e265e59f26e8db Mon Sep 17 00:00:00 2001 From: Sathyanarayana Shastry Chamarthi Date: Wed, 31 Oct 2012 19:39:45 +0530 Subject: [PATCH] Update jquery.selectBox.js --- jquery.selectBox.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jquery.selectBox.js b/jquery.selectBox.js index be0e41a..86b55a0 100755 --- a/jquery.selectBox.js +++ b/jquery.selectBox.js @@ -60,6 +60,12 @@ if (jQuery)(function($) { if ($(event.target).is('A.selectBox-inline')) event.preventDefault(); if (!control.hasClass('selectBox-focus')) control.focus(); }).insertAfter(select); + select.parents().bind('scroll',function(){ + //enable if you want to hide on scroll + //$('.selectBox.selectBox-menuShowing').trigger('mousedown'); + //updates element position on parent scroll where parent is scrollable ( i'm talking about parent element, not body) + ($('.selectBox-dropdown-menu').find(':visible').length) ? $('.selectBox').trigger('mousedown') : ''; + }); // Auto-height based on size attribute if (!select[0].style.height) { var size = select.attr('size') ? parseInt(select.attr('size')) : 5;