So I've tried using all the solutions that is available on the internet, but doesn't seem to work for some reason.
I'm using (or the project, rather) fancybox-1.3.4, and other than the close icon, a link needs to be used to close the pop-up.
<a id="kpitilepoplink" href="#kpitilepop">Trigger pop-up</a>
<div style="display:none;">
<div id="kpitilepop" class="newpopupcontainer">
Contents
<a href="#" id="popcloselink" class="blu-btn">Close</a>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("a#kpitilepoplink").fancybox({
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#popcloselink').click(function(){
alert();
$(this).fancybox.close();
});
});
</script>
The solutions available on the internet is not working, and i'm getting fancybox.close is not a function
error in the browser console