1

I am trying to set up a web-based tool that allows you to pick relevant products to suit your needs.

I am extremely basic at javascript and know I need to add a query selector just unsure where to code it.

Any help would be greatly appreciated.

    <script>
    $(document).ready(function () {
            $('#openBtn').click(function () {
                $('#myModal').modal({
                    show: true
                })
            });
        }
            $(document).on('show.bs.modal', '.modal', function (event) {
                var zIndex = 1040 + (10 * $('.modal:visible').length);
                $(this).css('z-index', zIndex);
                setTimeout(function () {
                    $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
                }, 0);
            });


        });
        
</script>
Monir Tarabishi
  • 716
  • 1
  • 16
  • 30
Matman180
  • 11
  • 2
  • That is JavaScript, not Java. Big difference. Please update your question. – JayC667 Jun 01 '21 at 02:02
  • 3
    Does this answer your question? [Multiple modals overlay](https://stackoverflow.com/questions/19305821/multiple-modals-overlay) – Monir Tarabishi Jun 01 '21 at 04:57
  • @MonirTarabishi yes that exact type of code. But I want to have multiple modals run alongside each other for some reason my first click link is the only one that works. – Matman180 Jun 01 '21 at 05:09

0 Answers0