0
私はブートストラップ(フロントエンド)とcodeigniterを使用してショッピングカートを開発しています。メニューアイテムに追加すると、アイテムの詳細が表示されます。しかし、私の問題はページのスクロールがモーダルポップアップの上に移動することです。ページがモーダルポップアップの上にスクロール
<a href="#" id="edit_product" data-id="<?php echo $lat['product_id'];?>" name="id" data-text="Add To Cart" class="my-cart-b item_add add_to_cart">Add To Cart</a>
アヤックス
$(".product_add").click(function(event) {
var currentId = globalId;
$.ajax({
type: 'POST',
url: '<?php echo site_url("ajax_controller1/product_add/'+currentId+'")?>',
data: { id:'1' },
success:function(response){
$("#cart_container1").html(response);
$("#myModal3").modal('show');
}
});/* Aajx */
});
モーダル
<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" style="overflow: visible;">
<div class="modal-dialog" role="document" style="overflow: visible;">
<div class="modal-content modal-info" style="overflow: visible;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body" id="cart_container1">
</div>
</div>
</div>
</div>
私はこれが私のデモのウェブサイトのリンク
で、この問題を克服するために、次の$('a.add_to_cart').click(function(e) {
e.preventDefault();
});
body.modal-open {
overflow: visible;
}
を行っています0
ボタンは私に感謝してくれてありがとう –