Search code examples
jquerycolorbox

jQuery colorbox loading very abruptly


I have a screen which is loaded inside the jQuery colorbox, it works fine but the problem is the way it loads does not look smooth. Is there any issue with the following code? Or is there any setting which I can't find?

$.fn.colorbox({
    iframe : true,
    width : '90%',
    height : '90%',
    scrolling : false,
    className: 'team-regedit-popup',
    href : url + "?" + params+"&projectId=" + projectId,
    overlayClose : false,
    onClosed : function() {
        $(parent.document.getElementById('cboxClose')).show();
        var sortId = $('.sortButton.sort_sel').data('sortid');
        var searchText = $('#searchText').val();
        projectRegistration.displayTeamTable(sortId, searchText);
        F.unlock_scroll(self);
    }
});

I have tried with fastIframe: false but didn't helped.


Solution

  • Try with transition flag in the docs, it has three values, default is elastic, try with none or fade.

    $.fn.colorbox({
        iframe : true,
        width : '90%',
        height : '90%',
        scrolling : false,
        transition : none,
        className: 'team-regedit-popup',
        href : url + "?" + params+"&projectId=" + projectId,
        overlayClose : false,
        onClosed : function() {
            $(parent.document.getElementById('cboxClose')).show();
            var sortId = $('.sortButton.sort_sel').data('sortid');
            var searchText = $('#searchText').val();
            projectRegistration.displayTeamTable(sortId, searchText);
            F.unlock_scroll(self);
        }
    });
    

    Hope it will help.