'; document.getElementbyClass('disableanchortag').appendChild(shareButs); }); //Trending Limit jQuery(document).ready(function(){ var wp_lm_chk = 0; var wp_lmt_val = 4; jQuery('.wp-lmt-slider .td-ajax-next-page').click(function(){ if(wp_lm_chk > (wp_lmt_val-1)) { jQuery('.wp-lmt-slider .td-ajax-next-page').addClass('ajax-page-disabled'); } else { wp_lm_chk++; } }); jQuery('.wp-lmt-slider .td-ajax-prev-page').click(function(){ if(wp_lm_chk < wp_lmt_val) { jQuery('.wp-lmt-slider .td-ajax-next-page').removeClass('ajax-page-disabled'); } if(wp_lm_chk > 0) { wp_lm_chk--; } }); }); //iframe Resize jQuery(document).ready(function(){ var noOfEl = 0; /* document.querySelector('style').textContent += "@media screen and (max-width:760px) { .td-header-rec-wrap { margin-left:-19px !important; } .td-header-sp-recs {margin-bottom:-5px !important;}}"; jQuery(".embed_iframe_ad").each(function() { var mobile_width = jQuery(document).width(); var mobile_height = jQuery(this).attr('mobile-height'); var s_width = jQuery(this).attr('width'); var s_height = jQuery(this).attr('height'); var mStyles = ''; var nStyles = ''; if (typeof mobile_width !== typeof undefined && mobile_width !== false) { mStyles += ' width : ' + mobile_width + 'px !important; '; } if (typeof mobile_height !== typeof undefined && mobile_height !== false) { mStyles += ' height : ' + mobile_height + ' !important; '; } document.querySelector('style').textContent += "@media screen and (max-width:760px) { .embed_iframe_ad { " + mStyles + " } }"; document.querySelector('style').textContent += ".embed_iframe_ad { " + nStyles + " } "; });*/ jQuery(".embed_iframe").each(function() { jQuery(this).addClass("iframeno_"+noOfEl); var mobile_width = jQuery(this).attr('mobile-width'); var mobile_height = jQuery(this).attr('mobile-height'); var s_width = jQuery(this).attr('width'); var s_height = jQuery(this).attr('height'); var mStyles = ''; var nStyles = ''; if (typeof mobile_width !== typeof undefined && mobile_width !== false) { mStyles += ' width : ' + mobile_width + ' !important; '; } if (typeof mobile_height !== typeof undefined && mobile_height !== false) { mStyles += ' height : ' + mobile_height + ' !important; '; } if (typeof s_width !== typeof undefined && s_width !== false) { nStyles += ' width : ' + s_width + '; '; } if (typeof s_height !== typeof undefined && s_height !== false) { nStyles += ' height : ' + s_height + '; '; } document.querySelector('style').textContent += "@media screen and (max-width:760px) { .embed_iframe.iframeno_"+noOfEl+" { " + mStyles + " } }"; document.querySelector('style').textContent += ".embed_iframe.iframeno_"+noOfEl+" { " + nStyles + " } "; noOfEl = noOfEl + 1; }); function resizeEmbed(obj) { var mobile_width = jQuery(obj).attr('mobile-width'); var mobile_height = jQuery(obj).attr('mobile-height'); var s_width = jQuery(obj).attr('width'); var s_height = jQuery(obj).attr('height'); var mStyles = ''; var nStyles = ''; if (typeof mobile_width !== typeof undefined && mobile_width !== false) { mStyles += ' width : ' + mobile_width + ' !important; '; } if (typeof mobile_height !== typeof undefined && mobile_height !== false) { mStyles += ' height : ' + mobile_height + ' !important; '; } if (typeof s_width !== typeof undefined && s_width !== false) { nStyles += ' width : ' + s_width + '; '; } if (typeof s_height !== typeof undefined && s_height !== false) { nStyles += ' height : ' + s_height + '; '; } document.querySelector('style').textContent += "@media screen and (max-width:760px) { .embed_iframe { " + mStyles + " } }"; document.querySelector('style').textContent += ".embed_iframe { " + nStyles + " } "; } }); //Replace "guest-author" with "author" in search results **DO NOT REMOVE** function remGuestAuth() { jQuery('#td-aj-search .item-details .entry-title a').each(function(){ //jQuery(this).attr("href", jQuery(this).attr('href').replace('/guest-author/','/author/')); }); }