Gaurav
Gaurav

Reputation: 57

Modal Window not opening

I am currently building a portfolio page for my website.

I have listed my clients & their logos & on clicking the logo a modal window will appear where in detail information will be given about how the work was accomplished.

Currently the issue is I have written a dummy code just to test the modal window to appear when I click on the first client, unfortunately that modal window isn't opening.

Help me people & let me know here my code is wrong :)

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Custom styles for this template -->

<link rel="stylesheet" type="text/css" href="style.css">
<title>Yorker Strategy</title>
</head>
<body>
<nav class="navbar navbar-fixed">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="index.html">
        <img alt="Yorker Strategy Logo" src="img/Logo.png">
      </a>
    </div>
    <div>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="about.html" class="gisha">About</a></li>
            <li><a href="services.html" class="gisha">Services</a></li>
            <li><a href="portfolio.html" class="gisha">Portfolio</a></li>
            <li><a href="contact.html" class="gisha">Contact Us</a></li>
        </ul>
    </div>
  </div>
</nav>

<!-- Separator -->
<div class='col-lg-12 separator'>

</div>

<div class='divHeader'><!-- Who are we section -->

    <div class="container"><!--container-->

        <div class="row"><!-- Who are we Title -->

            <div class='col-lg-4'></div>

            <div class='col-lg-4 divHeaderContent text-center'>
                <h1><br>Portfolio</h1>
            </div>

            <div class='col-lg-4'></div>

        </div><!-- End of Who are we Title -->
        <br><br>
    </div><!--End of container-->

</div>

<div class='portfolio'><!-- Portfolio section -->

    <div class="container"><!--container-->

        <div class='whoAreWeBodyBorder'>

            <div class="row portfolioRowHeight"><!-- First Portoflio Row -->

                <a href='#' data-toggle='modal' data-target='#modala&s' >

                    <div class='col-lg-4'>

                        <img src="img/client1-a&s.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Makeover</p>

                    </div>

                </a>

                <div class="modal fade" id='modala&s'>

                    <div class="modal-dialog">

                        <div class="modal-content">

                            <div class="modal-header">

                                <button class='close' data-dismiss='modal'>&times;</button>
                                <h4>Title</h4>

                            </div>

                            <div class="modal-body">

                                <p>Para</p>

                            </div>

                            <div class="modal-footer">

                                <button class='btn btn-default' data-dismiss='modal'>Close</button>

                            </div>

                        </div>

                    </div>

                </div>

                <div class='col-lg-4'>

                    <a href='#'>

                        <img src="img/client2-malav.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Makeover</p>
                        <p class='mvBoli text-center'>Brand Essentials - Website & Catalogue</p>

                    </a>

                </div>

                <div class='col-lg-4'>

                    <a href='#'>

                        <img src="img/client3-jp.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Creation</p>

                    </a>    

                </div>

            </div><!-- End of First Portoflio Row -->

            <div class="row portfolioRowHeight"><!-- Second Portoflio Row -->

                <div class='col-lg-4'>

                    <a href='#'>

                        <img src="img/client4-higs.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Creation</p>
                        <p class='mvBoli text-center'>Brand Essentials - Website</p>

                    </a>

                </div>

                <div class='col-lg-4'>

                    <a href='#'>

                        <img src="img/client5-aep.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Essentials - Website & Brochure</p>

                    </a>

                </div>

                <div class='col-lg-4'>

                    <a href='#'>

                        <img src="img/client6-et.png" class='img-resposive clientLogos'/>

                        <div class="separator"></div>

                        <br>

                        <h4 class="gisha text-center">Services Delivered</h4>

                        <br>

                        <p class='mvBoli text-center'>Brand Essentials - Mascot & Brochure</p>

                    </a>

                </div>

            </div><!-- End of Second Portoflio Row -->

        </div>

    </div><!--End of container-->

</div><!-- End of Portfolio section -->

<br><br>

<div class='footer'>

    <div class="container">

        <div class='row'>

            <div class='col-lg-12 smIcons text-center'>

                <ul>

                    <li><img src='img/fb.png'</li>
                    <li><img src='img/tw.png'</li>
                    <li><img src='img/ig.png'</li>
                    <li><img src='img/in.png'</li>

                </ul>

            </div>

        </div>

        <div class="row">

            <div class='col-lg-12 text-center gisha copyrightText'>

                <p>Copyright Yorker Strategy, 2016</p>

            </div>

        </div>

    </div>

</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

The testing modal is placed under div with class named portfolio, under first column of 'col-lg-4' which is kept under an 'a' tag.

Please help people!

Upvotes: 1

Views: 55

Answers (1)

Rhys Bradbury
Rhys Bradbury

Reputation: 1707

Try using a different selector

Change

modala&s

To

modalas

(In both the anchor and the modal)

Why? Check out the XML spec on the & symbol.

Ref are characters # or & allowed in xml?

Upvotes: 2

Related Questions