From: Anthony Talarico Date: Mon, 11 Jan 2016 17:41:41 +0000 (-0500) Subject: testing character count conditional X-Git-Tag: v1.0.0^2~71 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d0ac7c2d3a94a490e6c96be10bb66f7cb305827b;p=WP-Themes%2Fotsego.git testing character count conditional --- diff --git a/js/app.js b/js/app.js index ba5fa69..7acf047 100644 --- a/js/app.js +++ b/js/app.js @@ -106,8 +106,10 @@ $(document).ready(function () { // remove link from posts with less than 16 words for (var i = 0; i < $('div[class*="excerpt"]').length; i++){ - var words = $(".excerpt" + i).text().split(' '); - if(words.length < 16){ +// var words = $(".excerpt" + i).text().split(' '); + var words = $(".excerpt" + i).text(); + if(words.length < 225){ + alert(words.length); $(".excerpt" + i).parent().find("a").replaceWith(function(){ return $("

", {html: $(this).html()}); }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 7dac3fa..03e2a5b 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -97,8 +97,10 @@ $(document).ready(function () { // remove link from posts with less than 16 words for (var i = 0; i < $('div[class*="excerpt"]').length; i++){ - var words = $(".excerpt" + i).text().split(' '); - if(words.length < 16){ +// var words = $(".excerpt" + i).text().split(' '); + var words = $(".excerpt" + i).text(); + if(words.length < 225){ + alert(words.length); $(".excerpt" + i).parent().find("a").replaceWith(function(){ return $("

", {html: $(this).html()}); });