src/main/webapp/resources/libs/sb-admin-v2/js/screening/jquery.selectric.js
// Detect if currently selected option is visible and scroll the options box to show it
Detect if currently selected option is visible and scroll the options box to show it
Detect if currently selected option is visible and scroll the options box to show it
function _detectItemVisibility(index) {
          var liHeight = $li.eq(index).outerHeight(),
              liTop = $li[index].offsetTop,
              itemsScrollTop = $itemsScroll.scrollTop(),
              scrollT = liTop + liHeight * 2;
          $itemsScroll.scrollTop(
            scrollT > itemsScrollTop + itemsHeight ? scrollT - itemsHeight :
              liTop - liHeight < itemsScrollTop ? liTop - liHeight :
                itemsScrollTop
          );
        }
function _detectItemVisibility ( index ) { var liHeight = $li . eq ( index ) . outerHeight ( ) , liTop = $li [ index ] . offsetTop , itemsScrollTop = $itemsScroll . scrollTop ( ) , scrollT = liTop + liHeight * 2 ; $itemsScroll . scrollTop ( scrollT > itemsScrollTop + itemsHeight ? scrollT - itemsHeight : liTop - liHeight < itemsScrollTop ? liTop - liHeight : itemsScrollTop ) ; }
Detect if currently selected option is visible and scroll the options box to show it
Detect if currently selected option is visible and scroll the options box to show it