0

I am working on http://steam-to-rent.ch/mietdampfanlagen.html. As you can see I am using Bootstrap collapse and when you click on the "Anfrage" button it's displaying a Bootstrap's Modal. The problem is that when you click on the second "modal button" (Anfrage) and then you close that modal the background overlay color remains and I can't interact with the page. How can I solve it?

This is the code

<button type="button" class="btn btn-primary special"
    style="background: #fadf3e; border: 2px solid #000; color: #000; margin-bottom: 20px; margin-top: -10px; width: 100%;"
    data-toggle="modal"
    data-target=".bs-example-modal-sm">Anfrage</button>

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
        <h4 style="color: #000;">Mietdampfanlage 21 kg/h 10 bar</h3>
         <div class="col-sm-12 form">
             <form class="form-modal" role="form" method="post" action="index.php">
        <div class="form-group" style="margin-bottom: 15px !important;">      
            <div class="col-sm-12">
                <input type="text" class="form-control" id="name" name="name" placeholder="Vorname, Name" value="">
            </div>
        </div>
        <div class="form-group"  style="margin-bottom: 15px !important;">
            <div class="col-sm-12 ">
                <input type="text" class="form-control" id="name" name="firma" placeholder="Firma" value="">
            </div>
        </div>
        <div class="form-group"  style="margin-bottom: 15px !important;">
            <div class="col-sm-12 ">
                <input type="email" class="form-control" id="email" name="email" placeholder="E-Mail" value="">
            </div>
        </div>
        <div class="form-group" style="margin-bottom: 15px !important;">
            <div class="col-sm-12">
                <input type="text" class="form-control" id="name" name="telefon" placeholder="Telefon" value="">
            </div>
        </div>

        <div class="form-group" style="margin-bottom: 15px !important;">
            <div class="col-sm-12">
                <input type="text" class="form-control" id="name" name="zeit" placeholder="Zeitraum" value="">
            </div>
        </div>

        <div class="form-group"  style="margin-bottom: 15px !important;">
           <div class="col-sm-12">
                <textarea class="form-control" rows="4" name="message" placeholder="Nachricht"></textarea>
            </div>
        </div>
        <div class="form-group"  style="margin-bottom: 15px !important;">
            <div class="col-sm-12">
                <input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
            </div>
        </div>
        <div class="form-group"  style="margin-bottom: 15px !important;">
            <div class="col-sm-10 col-sm-offset-2">
                <! Will be used to display an alert to the user>
            </div>
        </div>
    </form></div>
    </div>
  </div>
</div>

Edit:

 <button id="modal_1" type="button" class="btn btn-primary special" style="background: #fadf3e; border: 2px solid #000; color: #000; margin-bottom: 20px; margin-top: -10px; width: 100%;" data-toggle="modal" data-target=".bs-example-modal-sm">Anfrage</button>
    <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
      <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="row">
             <div class="col-sm-12 form">
                 <div class="modal-header">
                 <h4 style="color: #000;">Mietdampfanlage 21 kg/h 10 bar</h4>
                 </div>     
                        <form class="form-modal" role="form" method="post" action="index.php">
            <div class="col-sm-12">               
            <div class="form-group">
                    <input type="text" class="form-control" id="name" name="name" placeholder="Vorname, Name" value="">
                </div>
            </div>
                         <div class="col-sm-12">    
                         <div class="form-group">
                    <input type="text" class="form-control" id="name" name="firma" placeholder="Firma" value="">
                </div>
            </div>

            <div class="col-sm-12 ">                 
            <div class="form-group">
                    <input type="email" class="form-control" id="email" name="email" placeholder="E-Mail" value="">
                </div>
            </div>

                <div class="col-sm-12 ">
                <div class="form-group">
                    <input type="text" class="form-control" id="name" name="telefon" placeholder="Telefon" value="">
                </div>
            </div>

                <div class="col-sm-12 ">             
                <div class="form-group">
                    <input type="text" class="form-control" id="name" name="zeit" placeholder="Zeitraum" value="">
                </div>
            </div>

            <div class="col-sm-12 ">                 
            <div class="form-group">
                    <textarea class="form-control" rows="4" name="message" placeholder="Nachricht"></textarea>
                </div>
            </div>

            <div class="col-sm-12 ">                 
            <div class="form-group">
                    <input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
                </div>
            </div>
            <div class="form-group"  style="margin-bottom: 15px !important;">
                <div class="col-sm-10 col-sm-offset-2">
                    <! Will be used to display an alert to the user>
                </div>
            </div>
        </form></div>
        </div>
          </div>
      </div>
    </div>
Antonioz
  • 151
  • 2
  • 18
  • Possible duplicate : http://stackoverflow.com/questions/11519660/twitter-bootstrap-modal-backdrop-doesnt-disappear – CodeRomeos Oct 06 '15 at 15:41

1 Answers1

-1
data-backdrop="static" 
data-keyboard="false"

first look and see if there is data-backdrop="Static" anywhere. That would do it. Also make sure data-keyboard is NOT false just to make sure you can interact.

Last I want you to look at the the ID's on the buttons and modals. make sure they are all different. I dont see an ID on this modal here so I would suggest something like

id="modal_1"

on the button AND the modal. Make sure it matches

fballer87
  • 74
  • 9