$(document).ready(function() { //icon replacement $('img[src="modules/faq/faq.png"]').replaceWith(''); $('img[src="modules/faq/faqlower.png"]').replaceWith(''); $('li.faqblock > a').addClass('btn btn-sm btn-primary mr-1'); //accordions var allAccs = 1 $('.accordion-toggle').each(function() { var accTitle = $(this).html(); var accContent = $(this).next('.accordion-content').html(); $(this).next('.accordion-content').remove(); var newAcc = '\
\ \
\
'+accContent+'
\
\
\ '; $(this).replaceWith(newAcc); allAccs++; }); //new search $('#search').jcOnPageFilter({ animateHideNShow: false, focusOnLoad: true, highlightColor: "yellow", textColorForHighlights: "#000000", caseSensitive: false, hideNegatives: true, parentLookupClass: "card-faq", childBlockClass: "collapse" }); // show all elements if search is empty $('#search').on("keyup input", function() { var inputVal = $(this).val(); if(inputVal.length==0) { $('.card-faq').removeAttr('style'); } }); // pull footer to right $('.main .footer').addClass('text-right'); // search num badge $('.main #count').addClass('badge badge-secondary font-weight-normal'); });