testing character count conditional
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 11 Jan 2016 17:41:41 +0000 (12:41 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 11 Jan 2016 17:41:41 +0000 (12:41 -0500)
js/app.js
js/custom/pageSetup.js

index ba5fa69..7acf047 100644 (file)
--- 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 $("<h2 />", {html: $(this).html()});
             });
index 7dac3fa..03e2a5b 100644 (file)
@@ -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 $("<h2 />", {html: $(this).html()});
             });