کد:
jQuery(document).ready(function($){
$(window).load(function(){
if(!$.cookie('TheCookie')) { setTimeout(function(){
var $newdiv1 = $( "<div id='downlodsa' class='download_catalog star'><i class='fa fa-times' aria-hidden='true' id='closen'></i><img src='example.com/wp-content/uploads/2017/07/cc.jpg'><a href='example.com/wp-content/uploads/2018/06/catalog-facewood.pdf' target='_blank'>دانلود کاتالوگ </a></div>" );
$( "body" ).append( $newdiv1 );
$( "#closen" ).click(function() {
$( "#downlodsa" ).remove();
}); }, 8000);
$(".cmsplugin_fancybox_link").trigger('click');
$.cookie( 'TheCookie', '1', { expires: 7 });
}
});
});