M
M
mrzgt2015-09-23 13:41:57
JavaScript
mrzgt, 2015-09-23 13:41:57

How to open bootstrap in model window?

Now just a model window opens, how to make an opening in the bootstrap window

if (json['success']) {
      
      
      
               $('#cart-total').html(json['total']);

                    $('#notification').after('<div class="modal_bg" onclick="modal_bg_click()"></div><div class="modal_cart" onclick="modal_cart_click()"></div>');
                    // Ширина и высота всего документа
                    var HeightDocument = $(document).height();
                    var WidthDocument = $(document).width();
                    // Ширина и высота окна браузера
                    var HeightScreen = $(window).height();
                    var WidthScreen = $(window).width();

                    // Плавное анимационное наложение на страницу серого фона
                    $('.modal_bg').css({ 'width': WidthDocument, 'height': HeightDocument });
                    $('.modal_bg').fadeIn(1000);
                    $('.modal_bg').fadeTo("slow", 0.7);

                    // Расположение модального окна с содержимым по высоте учитывая скроллинг документа
                  var Top_modal_window = $(document).scrollTop() + HeightScreen / 2 - $('.modal_cart').height() / 2;
                  var Left_modal_window = -($('.modal_cart').width() / 2);
                  $('.modal_cart').css({ 'top': Top_modal_window + 'px', 'display': 'block', 'margin-left': Left_modal_window + 'px' });

                    $('.modal_cart').load('index.php?route=checkout/cartPopup #cartPopup > *', function (response, status, xhr) {
                      var newHeight = $('.modal_cart').outerHeight(false) - $('.cart_popup1 *').outerHeight(true) - $('#heading1 *').outerHeight(true) - $('#contentUp *').outerHeight(true) - $('.mini-cart-total1 *').outerHeight(true) - $('#checkout1 *').outerHeight(true) - $('#byhand').outerHeight(true);
                      $('.mini-cart-info1').height(newHeight);

                        if ($('#checkout_quick').length > 0) {
                          $('#checkout_quick_cart').attr('href', $('#checkout_quick').attr('href'));
                            $('#checkout_quick_cart').text($('#checkout_quick').text());
                      }
                  });
                     
                    $("body").css({ "overflow": "hidden" });
                
        
        
        
        $('#cart').load('index.php?route=module/cart' + ' #cart > *');
            }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question