0

 <!-- Side Bar Starts -->
                                        <div class="latest-post-widget myDiv shopping-cart col-lg-4">

                                            <h4 class="title">
                                                Item List
                                            </h4>
                                            <ul class="post-list">
                                                <li ng-repeat="detail in summery">
                                                    <div class="post">
                                                        <div>
                                                            <img src="{{ asset('assets/web/new/images/Box.png') }}"
                                                                alt="">
                                                        </div>
                                                        <div class="item-name list-item">
                                                            @{{ detail . title }}
                                                        </div>
                                                        <div class="item-amount row input-group-items">

                                                            <button type="button"
                                                                ng-click="decrementValue($event,detail.title,detail.image,detail.itemid,$index)"
                                                                value="-"
                                                                class="button-minus btn-minus less summary-list-pop"
                                                                data-field="quantity"> - </button>
                                                            <input type="text" id="summery@{{ detail . itemid }}" step="1"
                                                                max="" name="quantity"
                                                                class="quantity-field amount item-amt summary-list-pop"
                                                                value="@{{ detail . qty }}">
                                                            <button type="button"
                                                                ng-click="incrementValue($event,detail.title,detail.image,detail.itemid,$index)"
                                                                class="btn-plus button-plus add summary-list-pop" value="+"
                                                                data-field="quantity"> + </button>
                                                        </div>
                                                        <div class="delete-btn-item">
                                                            <a href="#" ng-click="deleteItem($event,$index)"
                                                                class="delete-item"><i class="fas fa-trash-alt"></i></a>
                                                        </div>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="post">

                                                    </div>
                                                </li>

                                            </ul>



                                        </div>
 $(window).scroll(function() {
  $(".mydiv").css({
  
    "margin-top": ($(window).scrollTop()) + "px",
     "margin-left": ($(window).scrollLeft()) + "px"

  });
});

This is the code I have tried, The scrolling is working fine But I want stop at a certain div How to do this using jquery ?

I have added my html here, I just want stop scrolling myDiv when it reached another div when page scroll

thank you Stay safe

1 Answers1

0

I think you want a specific div to stop from scrolling then may be this will help you

$('#noscrolldiv').bind('mousewheel', function() { return false });
Asif Ali
  • 123
  • 7