This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Removing the article dropdown | |
$('.article-list a[aria-selected]').removeAttr('aria-selected').removeAttr('data-asynchtml-ressource') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Step by Step article located here: https://support.zendesk.com/entries/31041636-Show-less-than-6-articles-in-a-section-in-Help-Center | |
//Show less than 6 articles | |
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'), | |
nativeMore = $(categories[j]).siblings('.see-all-articles'); | |
if ( articles.length > 3 ) { | |
for (var k = 3; k < articles.length; k++ ) { | |
$(articles[k]).hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.location.href == "https://yoururl.zendesk.com/hc/en-us") { | |
$('ul.article-list').hide(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Limit number of promoted articles on homepage | |
if(typeof $('.promoted-articles ul').get(0) != 'undefined') { | |
var _sectionArticles = $('.promoted-articles ul'); | |
_sectionArticles.each(function(_aidx, _aitm) { | |
var _itmCount = $(_aitm).find('li').length; | |
var _allLink = $(_aitm).prev('h3').find('a').attr('href'); | |
if(_itmCount > 5) { | |
for(var x = (_itmCount - 1); x > 4; x--) { | |
$($(_aitm).find('li')[x]).remove(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Humble Squid boxes clickable | |
$(".category-list li:has(a)").click(function() { | |
window.location = $("a:first",this).attr("href"); | |
}); | |
$(".category-list li").css('cursor', 'pointer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Only show five promoted articles | |
$(document).ready(function () { | |
if(typeof $('.promoted-articles ul').get(0) != 'undefined') { | |
var _sectionArticles = $('.promoted-articles ul'); | |
_sectionArticles.each(function(_aidx, _aitm) { | |
var _itmCount = $(_aitm).find('li').length; | |
var _allLink = $(_aitm).prev('h3').find('a').attr('href'); | |
if(_itmCount > 5) { | |
for(var x = (_itmCount - 1); x > 4; x--) { | |
$($(_aitm).find('li')[x]).remove(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--This code goes in your document head --> | |
<!-- Font Awesome --> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Custom CSS for Video Icons on ArticleList */ | |
.video:before{ | |
content: "\f1c8"; | |
color: #585858; | |
font-family: FontAwesome; | |
font-style: normal; | |
font-weight: normal; | |
text-decoration: none; | |
font-size: 18px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Adding text under Title for Humble Squid theme | |
$( ".category-list li:nth-child(1) a " ).after( "<p>description 1 goes here</p> " ); | |
$( ".category-list li:nth-child(2) a" ).after( "<p>description 2 goes here</p> "); | |
$( ".category-list li:nth-child(3) a" ).after( "<p>description 3 is a really really realy really really long description </p> " ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Hiding the 5th and 6th so only 4 will show | |
$( "section.related-articles li:nth-child(5)" ).hide(); | |
$( "section.related-articles li:nth-child(6)" ).hide(); |