I've been looking over a web site that pops up a modal box when you click a "Read More" link and then dismisses the box when you click "close" at the top of the box.  The way they do this, though, is strange. No jQuery is involved.  The Read More link initiates a reload of the page with a query string that causes PHP to include extra code just before the </body> tag.  This extra markup includes an "overlay" div with width = height = 100%, color = black, opacity = 0.75, and z-index = 100. After the overlay div comes the pop up box with a z-index of 102.

The thing that puzzles me is the way they close the box. "Close" is just a link with href="#".   Somehow, it seems, this has to reload the original version of the page, that doesn't have the overlay div and box div at the bottom, to make the popup go away, but it's not clear how href="#" does  this. My understanding of href="#" is that it just jumps to the top of the page.

Could anyone explain what's going on here?  You can see the page at  Just click any of four Read More links.

Thanks for any insight.
Who is Participating?
eriksmtkaConnect With a Mentor Commented:
The reason for the 'href ="#"', is because, in order for the jQuery (or other javascript framework) to do its thing on a link, it had to be a "valid link" to begin with. "#", just happens to be the shortest valid link, and also no worries that it will leave the page.
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
The class="thickbox" activates the jquery plugin.
Ray PaseurConnect With a Mentor Commented:
The assertion that "No jQuery is involved" appears to be factually inaccurate.  Here are lines 14 and 15 from the View Source of the page.  That strongly suggests to me the use of jQuery.
<script type="text/javascript" src=""></script>
  <script type="text/javascript" src=""></script>

Open in new window

stevaAuthor Commented:
Yes.  I can see now that there's an entire Cody Lindley Thickbox  javascript  module being invoked here that's full of jQuery. Sorry for not taking more time with it initially.   I split the points.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.