Question

I have set up the DOM Element (hidden div) exmplae of nyroModal on my computer adding the js files and stylesheet but when I click the link to display the hidden div nothing seems to happen, can anyone suggest where I might be going wrong?

  <!DOCTYPE html >

 <link rel="stylesheet" href="styles/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.nyroModal.js"></script>
<!--[if IE 6]>
    <script type="text/javascript" src="js/jquery.nyroModal-ie6.min.js"></script>
<![endif]-->
<script type="text/javascript">
    $(function() {
      $('.nyroModal').nyroModal();
    });
</script>

<a href="#test" class="nyroModal">DOM Element (hidden div)</a>

<div id="test" style="display: none; width: 600px;">
    <a href="demoSent.php" class="nyroModal">Open a new modal</a><br />
    Test
</div>

Was it helpful?

Solution

You have the class="myroModal" on the link, not the div. Or you need to change the $('.nyroModal').nyroModal(); to be $('.test').nyroModal();

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top