anchor.diff:                  <div class="modal-body">
   
                       <div id ="carousel" class="carousel-inner">
  -
                       </div>
   
                       <a class="left carousel-control" role="button" data-slide="prev" href="#lb-gallery1-2">
  
positive.code:     <link rel="stylesheet" href="resources/assets/mobirise-gallery/style.css">
      <link rel="stylesheet" href="resources/assets/mobirise-slider/style.css">
      <link rel="stylesheet" href="resources/assets/mobirise/css/mbr-additional.css" type="text/css">
  </head>
  <body>
  <section class="mbr-gallery mbr-section mbr-section--no-padding" id="gallery1-2"
  
negative.code:            contentType: "application/json; charset=utf-8",
             dataType: "json",
             success: function (data) {
               content = content.concat(data.entities);
                 var gallery = $('#gallery');
                 var carousel = $('#carousel');
                  for(var i = 0; i < data.entities.length - 1; i++){
                      gallery.append('<div name="' + i + '" class="col-lg-3 col-md-4 col-sm-6 col-xs-12 mbr-gallery-item"><a href="#lb-gallery1-2" data-slide-to="' + i + '" data-toggle="modal"> <img alt="" src="' + data.entities[i].src + '"><span class="icon glyphicon glyphicon-zoom-in"></span></a></div>');
                      carousel.append('<div id=' + i + ' class="item"><div></div><img alt="" src="' + data.entities[i].src + '"></div>');
                  }
                 gallery.append('<div name="' + (data.entities.length - 1) + '" class="col-lg-3 col-md-4 col-sm-6 col-xs-12 mbr-gallery-item"><a href="#lb-gallery1-2" data-slide-to="' + (data.entities.length - 1) + '" data-toggle="modal"> <img alt="" src="' + data.entities[data.entities.length - 1].src + '"><span class="icon glyphicon glyphicon-zoom-in"></span></a></div>');
                 carousel.append('<div id=' + i + ' class="item active"><img alt="" src="' + data.entities[data.entities.length - 1].src + '"></div>');
  
                 $('.carousel-control, .mbr-gallery-item').click(function () {
                     setTimeout(function () {
                         var activeId = $('.active').attr('id');
                         var item = data.entities[activeId];
                         var rightInfo = $('#right-info').html("");
                         var sku = '<div style="margin-top: -500px; margin-left: 650px"><div style="color: #ffffff"><h2>Артикул:' + item.sku + '</h2></div>';
                         var length = '<div style="color: #ffffff"><h2>Длинна:' + item.length + '</h2></div>';
                         var width = '<div style="color: #ffffff"><h2>Ширина:' + item.width + '</h2></div>';
                         var pricePerMeter = '<div style="color: #ffffff"><h2>Цена за метр: ' + item.pricePerMeter + '</h3></div>';
                         var totalPrice = '<div style="color: #ffffff"><h2>Общая цена: ' + item.totalPrice + '</h2></div>';
                         var button = '<button onclick="onAddClick(' + activeId + ')"  type="button" data-dismiss="modal" class="btn btn-danger">В корзину</button></div>';
                         rightInfo.append(sku + length + width + pricePerMeter + totalPrice + button)
                     }, 750);
                 });
             }
         });
     });
  
      var onAddClick = function (activeId) {
          alert("Ткань с id: " + activeId + " добавлена в корзину");
          content.splice(activeId,1);
          alert(content.length);
          $('#' + activeId).detach();
          $('div[name='+activeId+']').detach();
          $('#' + content.length-1).addClass("active");
      }
  
  </script>
  
  </html>