Slider Revolution WP
09.27.2016
Special Note:
This script can also be used to simply select another filter other than “Filter All” if that’s your goal (see code comments)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
(function() { // change this to whatever filter you'd like to have selected by default instead var filterName = 'Title of Your Default Filter'; var grid = jQuery('.esg-grid'), timer = setInterval(function() { if(grid.is(':visible')) { clearInterval(timer); // comment out the line below if you'd like to keep the "Filter All" button jQuery('.esg-allfilter').remove(); filterName = filterName.toLowerCase().split(' ').join('-'); jQuery('.esg-filterbutton[data-filter=filter-' + filterName + ']').trigger('click'); } }, 500); })(); |