I am using jquery to pop up the image I click. Everything works fine except disabling the div. Can anyone help me?
What happens in the sense If I click any other image it loads in the popup.
<!DOCTYPE html>
<html>
<head>
<title>Own</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("img").click(function(){
$("#page").css({ opacity: 0.2});
$('#page').prop('disabled',true);
$("#myModal").css({ opacity: 1});
var sr=$(this).attr('src');
$("#mimg").attr('src',sr);
$("#myModal").fadeIn("slow");
});
});
$(document).ready(function(){
$(".close").click(function(){
$("#myModal").fadeOut("slow");
$("#mimg").attr('src',"");
$("#page").css({ opacity: 1 });
});
});
</script>
<style>
.modal{
width:500px;
height:375px;
padding:5px;
border:1px solid #ccc;
opacity: 0;
-moz-box-shadow: 0 1px 3px #777;
-webkit-box-shadow: 0 1px 3px #777;
margin:40px auto;
}
.firefox {
position:fixed;
top:10%;
left:20%;
}
.chrome {
position:fixed;
top:10%;
left:60%;
}
.safari {
position:fixed;
top:50%;
left:20%;
}
.ie {
position:fixed;
top:50%;
left:60%;
}
</style>
</head>
<body>
<div id="page">
<img class="firefox" src="http://sheshtawy.files.wordpress.com/2010/05/extra-firefox.png" style="min-height:300px;height:300px;" alt="Responsive image">
<img class="chrome" src="http://3.bp.blogspot.com/-Dp427Q47tfw/UBkAh8v4LcI/AAAAAAAAAKA/sgSqilPx6Vw/s1600/Google_Chrome.jpg" style="min-height:300px;height:300px;" alt="Responsive image">
<img class="safari" src="http://www.tech2techsupport.com/image/safari.png" style="min-height:300px;height:300px;" alt="Responsive image">
<img class="ie" src="http://boredcentral.com/wp-content/uploads/2013/10/Chrome.jpeg" style="min-height:300px;height:300px;" alt="Responsive image">
</div>
<div class="modal" id="myModal">
<button type="button" class="close" style="position:fixed;top:5%;">×</button>
<img id="mimg" src="" style="min-height:300px;height:300px;" style="position:fixed;left:10%;"="Responsive image">
</div>