Solved JS Modal Problem of Stay Top

Put this code to bootstrap.js file

//After this code

if (!that.$element.parent().length) {
        that.$element.appendTo(document.body) // don't move modals dom position
      }

// put this code

/* ****************************** */
        var offset = $(document).scrollTop();

        // Get the window viewport height
        var viewportHeight = $(window).height();

        // cache your dialog element
        var $myDialog = that.$element; //$('#cbf_scategory');

        // now set your dialog position
        $myDialog.css('top',  offset);
    /* ****************************** */

Comments

Popular posts from this blog