Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function category_description_toggle(){
- ?>
- <script>
- (function () {
- jQuery(document).ready(function ($) {
- let desc = $('#portfolio-category-description');
- $('#js_sort_items a').on('click', function() {
- let filter = $(this).data("filter");
- desc.find('div').hide();
- desc.find(`.${filter}`).show();
- });
- });
- })();
- </script>
- <?php
- }
- add_action('wp_footer', 'category_description_toggle');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement