Pingendo Help Center

.modal('show') method (SOLVED) again by gseregni


#1

I would like to use this metod for show up the modal when the website homepage load, i try to copy past this code but for some obviously reason he dosn’t work properly. The modal drag and drop module of pingendo work really well but i need a show up not a button to clic and after a lot of try this and that I didn’t find the right way to solve it.

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Open Bootstrap Modal on Page Load</title>

<link rel="stylesheet" href="css/bootstrap.min.css">

<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>

<script src="js/bootstrap.min.js"></script>

<script type="text/javascript">

    $(document).ready(function(){

        $("#myModal").modal('show');

    });

</script>

</head>

<body>

<div id="myModal" class="modal fade">

    <div class="modal-dialog">

        <div class="modal-content">

            <div class="modal-header">

                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>

                <h4 class="modal-title">Subscribe our Newsletter</h4>

            </div>

            <div class="modal-body">

                <p>Subscribe to our mailing list to get the latest updates straight in your inbox.</p>

                <form>

                    <div class="form-group">

                        <input type="text" class="form-control" placeholder="Name">

                    </div>

                    <div class="form-group">

                        <input type="email" class="form-control" placeholder="Email Address">

                    </div>

                    <button type="submit" class="btn btn-primary">Subscribe</button>

                </form>

            </div>

        </div>

    </div>

</div>

</body>

</html>

#2

Which bootstrap are you importing ?

Using 4.1.3 from getbootstrap.com works

  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous">

#3

it works :rofl::rofl::rofl::rofl::rofl: how can i live without you?
https://fattoriamanostalla.it/