Bellow is my codes.what i have tried.when this popup appear i want to use this close button to close entire popbox.
CSS code
.bigdiv{
display:none;
background-color:#efefef;
box-shadow: 10px 10px 10px 100000px rgba(0, 0, 0, 0.4);
border:2px solid #efefef;
width:400px;
height:300px;
position:fixed;
z-index:500;
top:25%;
left:25%;
margin:0 auto;
padding:20px;
}
.bigdiv:after {
cursor:pointer;
content:url('http://static.doers.lk/img/closebox.png');
position: relative;
right: -195px;
top: -310px;
z-index: 999;
}
JQUERY
$(".left div").click(function () {
$(".bigdiv").show("slow");
$(".bigdiv").click(function () {
$(".bigdiv").hide();
}) ; }) ;
HTML
<div class="left">
<div>intro text here</div><div></div><div></div>
</div>
<div class="bigdiv">some content</div>
I want to select :after elements .how to do that using jquery ?
See Question&Answers more detail:os