0

Here is my code :

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <div class="modal-body">
                <div id="dialog_content" class="dialog_content">
                    <div class="dialogModal_header">
                        <h2>Let's Connect!</h2>
                    </div>
                    <div class="dialogModal_content">
                        <input id="name" type="text" placeholder="Name">
                        <br></br>
                        <input id="email" type="text" placeholder="Email">
                        <br></br>
                        <input id="ph" type="text" placeholder="Phone Number">
                        <br></br>
                        <input id="cmnts" type="text" placeholder="Comments">
                    </div>
                    <div class="dialogModal_footer">
                        <button id="sendEmail" type="button" data-dialogmodalbut="ok">Send</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" >
    $(document).ready(function () {

        alert('Hello');

    });
</script>
  • Have you added jquery references? – Amal Hashim Oct 30 '14 at 14:33
  • Ensure the jQuery reference is in the User Control or your Master Page. If you go to Chrome, F12, Console, it will throw an error such as '$' is not defined if this is the case – Michael Colbs Oct 30 '14 at 14:34
  • Both Colbs and Amal have covered it already but you can type in typeof jQuery == 'undefined'; in your developer tools and if it returns true you don't have any library referenced. – Jordan Oct 30 '14 at 14:36
  • is it sharepoint 2013? – Gwny Oct 30 '14 at 15:08
  • If it is sharepoint 2013, are you using the Minimal Download Strategy (MDS -- it's generally on by default) – John-M Oct 30 '14 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.