$("body").on('click', 'li.vc_grid-filter-item.back-to-top',function() { $([document.documentElement, document.body]).animate({ scrollTop: $("div#all_books").offset().top }, 1000); }); jQuery("select#ct_mobile_filter").change(function(){ var link = jQuery(this).val() window.location = link // console.log(link) }) // ========= Custom Filter ============== jQuery("li.cm_grid-filter-item:not(.back-to-top)").click(function(){ text = jQuery(this).find("span").text(); jQuery(".section_title h2 span#all").text(text) target = jQuery(this).find("span").data("cm-grid-filter-value") if(target == "*"){ jQuery("article.elementor-post.elementor-grid-item").fadeIn() }else{ jQuery("article.elementor-post.elementor-grid-item").hide() jQuery(".elementor-post__badge:contains("+target+")").parents(".elementor-grid-item").fadeIn() } }) jQuery(".cm_grid-styled-select select").click(function(){ target = jQuery(this).val(); jQuery(".section_title h2 span#all").text(target); if(target == "*"){ jQuery("article.elementor-post.elementor-grid-item").fadeIn() }else{ jQuery("article.elementor-post.elementor-grid-item").hide() jQuery(".elementor-post__badge:contains("+target+")").parents(".elementor-grid-item").fadeIn() } }) // ========= Custom Filter ============== });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter