Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* LAZY LOAD ADS */
- function lazy_ad_load (id, append_content, offset) {
- jQuery(document).ready(function($){
- if (show_var == undefined) {
- var show_var = []; }
- if (offset== undefined) {
- offset=2000; }
- if($("#" + id).length != 0){
- show_var[id]=0;
- $(window).scroll(function() {
- if (show_var[id]==0 && $(window).scrollTop()>$("#"+id).offset().top-offset) {
- jQuery("#"+id).append(append_content);
- show_var[id]=1;
- }
- });
- }
- });
- }
- /* END LAZY LOAD ADS */
- lazy_ad_load ('content_third', '<div id=\'div-gpt-ad-1486389222273-0\' class=\"content-ads\"><script>googletag.cmd.push(function() { googletag.display(\'div-gpt-ad-1486389222273-0\'); });<\/script><\/div>', 2100);
- lazy_ad_load ('content_fourth', '<div id=\'div-gpt-ad-1499780497058-0\' class=\"content-ads\"><script>googletag.cmd.push(function() { googletag.display(\'div-gpt-ad-1499780497058-0\'); });<\/script><\/div>', 2100);
- lazy_ad_load ('content_fifth', '<div id=\'div-gpt-ad-1505381913805-0\'><script>googletag.cmd.push(function() { googletag.display(\'div-gpt-ad-1505381913805-0\'); });\r\n<\/script><\/div>', 2100);
- lazy_ad_load ('ads_below', '<div id=\'div-gpt-ad-1480076398305-0\' class=\"content-ads\"><script>googletag.cmd.push(function() { googletag.display(\'div-gpt-ad-1480076398305-0\'); });<\/script><\/div>', 2100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement