최근 검색


최근 검색 없음

GeoffWolfe's Avatar

GeoffWolfe

가입한 날짜: 2021년 5월 28일

·

마지막 활동: 2021년 10월 27일

팔로잉

0

팔로워

0

총 활동 수

4

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 GeoffWolfe

GeoffWolfe님이 에 댓글을 입력함

커뮤니티 댓글 Discussion - Tips and best practices from the community

Hi folks,

I am too having problems with the See All x Articles link still showing on my home page too. It has been coming and going the last few weeks and now it is staying. 

Any chance someone can review my code to see what I can do? It is working fine on the Category page.

My JS:

$(document).ready(function() {

if (document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li');
var articleCount = articles.length;
var moreLink = $(categories[j]).siblings('.see-all-articles');
var moreArticles = moreLink.text();
if (moreArticles != "") {
articleCount = moreArticles.replace("See all","");
articleCount = +articleCount.replace("articles","");
moreLink.hide(); }
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide();

}}

// change the heading title

var articleCount = " (" + articleCount + ")";
var catTitle = $(categories[j]).parent().find('h3 a').text();
$(categories[j]).parent().find('h3 a').text(catTitle + articleCount);

}}

댓글 보기 · 2015년 7월 07일에 게시됨 · GeoffWolfe

0

팔로워

0

투표 수

0

댓글


GeoffWolfe님이 에 댓글을 입력함

커뮤니티 댓글 Discussion - Tips and best practices from the community

@frank thanks! My site started working properly today without me changing anything, so something changed and reverted in Zendesk source I suppose.

댓글 보기 · 2015년 6월 24일에 게시됨 · GeoffWolfe

0

팔로워

0

투표 수

0

댓글


GeoffWolfe님이 에 댓글을 입력함

커뮤니티 댓글 Discussion - Tips and best practices from the community

If been using *Frank Perazelli's *javascript above (and now below) to suppress the "See all x articles" link text. In the last day or two it stopped working. Can anyone help troubleshoot what needs to be changed?

 

//  Limit Article List to display only 3 entries - NEW CODE

if (document.location.href.indexOf('section') == -1 ) {

  var categories = $('ul.article-list');

  for (var j = categories.length - 1; j >= 0; j--) {

    var articles = $(categories[j]).find('li');

    var articleCount = articles.length;

    var moreLink = $(categories[j]).siblings('.see-all-articles');

    var moreArticles = moreLink.text();

    if (moreArticles != "") {

      articleCount = moreArticles.replace("See all","");

      articleCount = +articleCount.replace("articles","");

      moreLink.hide(); }

     if ( articles.length > 3 ) {

      for (var k = 3; k < articles.length; k++ ) {

        $(articles[k]).hide(); } }

// change the heading title

      var articleCount = " (" + articleCount + ")";

      var catTitle = $(categories[j]).parent().find('h3 a').text();

       $(categories[j]).parent().find('h3 a').text(catTitle + articleCount);

}}

댓글 보기 · 2015년 6월 24일에 게시됨 · GeoffWolfe

0

팔로워

0

투표 수

0

댓글