Last Updated: July 25, 2019
·
1.242K
· carlosagile

Fix hidden scrolls in select with jqtransform.js

PATCH into $.fn.jqTransSelect function.

  • This patch fix the problem with scrolls within selectsTransforms with jqtransform.js * PATCH; Use the$ul.css({overflow: 'auto'});

var oLinkOpen = $('a.jqTransformSelectOpen', $wrapper).click(function(){
    //Check if box is already open to still allow toggle, but close all other selects.
    if( $ul.css('display') == 'none' ) {jqTransformHideSelect();}
    if($select.attr('disabled')){return false;}

    $ul.slideToggle('fast', function(){
    var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top);
    $ul.animate({scrollTop: offSet});
    });

    // PATCH Chrome and tablets to fix problems with scrolls into SELECTS.
    $ul.css({overflow: 'auto'});
    // END PATCH.

    return false;
});