Amjath Amjath - 12 days ago 4x
Javascript Question

Simple Javascript and CSS Popup for HTML not working

Here is my JSfiddle sample for your reference.


<a href='' class="photoclick"><h2><b>Click Here to See Popup! </b></h2></a> <br/>
<div class="popup">
<div class="content">
<img src="" alt="quit" class="closephoto" id="closephoto" style="width:25px; height:25px"/>
Welcome Welcome Welcome Welcome Welcome Welcome Welcome


var overlay = $('<div id="photooverlay"></div>');

$('.closephoto').click(function () {
return false;

$('.photoclick').click(function () {;
return false;

I tried running on browser, all I see is the grey out background nothing else.
Please check my jsfiddle and tell me what's the issue

Edit: MY master page has

<script src="//" type="text/javascript"></script>

still i can see only gray background only

Edit2: I have this on one of my asp Content page.My master page has

<link rel="stylesheet" href="//" />
<script src="//" type="text/javascript"></script>
<script src="//" type="text/javascript"></script>
<script src=""></script>

Still I see only grey background


You missed having a jquery library before the code. And you have not imported or added a juery library in the fiddle itself.


will need jquery included before its called.

check this fiddle