Sledujte nás na YouTube

Meizu

"> } ]; //napoveda: tag-iphone-xs, content
/* konec - REKLAMA DLE TAGU zadani reklamy */ /* START - REKLAMA DLE TAGU - programovani */ var tagyArray = []; var tagyArray2 = []; $.each( tagy_obj, function( key, value ) { var slug_tagu=value["slug_tagu"]; var reklama=value["reklama"]; // sahifa if ($('body').is('.single-post, .post-template-default')){ if ($('#the-post').hasClass(slug_tagu)){ tagyArray.push(slug_tagu); } } // wptouch if ($('body').is('.single-post, .theme-bauhaus-child')){ if ($('#the-post-wptouch').hasClass(slug_tagu)){ // ok mame tag, pustime reklamu tagyArray2.push(slug_tagu); } } }); // sestavime reklamu // sahifa if ($('body').is('.single-post, .post-template-default')){ var sortedArray = tagyArray.sort(function (a, b) { if (a < b) return -1; else if (a > b) return 1; return 0; }); var sahifapole = sortedArray.slice(0, 1); $.each( tagy_obj, function( key, value ) { var slug_tagu=value["slug_tagu"]; var reklama=value["reklama"]; if($.inArray(slug_tagu, sahifapole) != -1) { $("#the-post .entry").append(reklama); //tagyArray.push(slug_tagu); } }); } // wptouch if ($('body').is('.single-post, .theme-bauhaus-child')){ var sortedArray2 = tagyArray2.sort(function (a, b) { if (a < b) return -1; else if (a > b) return 1; return 0; }); var wptouchpole = sortedArray2.slice(0, 1); $.each( tagy_obj, function( key, value ) { var slug_tagu=value["slug_tagu"]; var reklama=value["reklama"]; if($.inArray(slug_tagu, wptouchpole) != -1) { if ($('#the-post-wptouch .post-page-content .wptouch-showcase.showcase-location-post_content').length > 0 ) { $('#the-post-wptouch .post-page-content .wptouch-showcase.showcase-location-post_content').before(reklama); } // nebo pokud reklamni div neni tak jen pripnem pod clanek else $('#the-post-wptouch .post-page-content').append(reklama); //tagyArray.push(slug_tagu); } }); } /* KONEC - REKLAMA DLE TAGU programovani */ });