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:non
Unfortunately, you can't select pseudo-elements in jQuery (or JavaScript in general).
jQuery's appendTo()
method works exactly like CSS :after
though, so it might work as a replacement (albeit not so elegant as pure CSS solution).
e.g instead of:
.bigdiv:after {
cursor:pointer;
content:url('http://static.doers.lk/img/closebox.png');
position: relative;
right: -195px;
top: -310px;
z-index: 999;
}
Try it like this
CSS:
.bigdivAfter {
cursor:pointer;
position: relative;
right: -195px;
top: -310px;
z-index: 999;
}
JS:
$("
").appendTo(".bigdiv");
And then you can select the closebox image as normal.