admin
2 months ago
builder
2 months ago
stripe
2 months ago
admin.js
2 months ago
checkout-fields-manager.js
2 months ago
checkout.js
1 week ago
clipboard.min.js
2 months ago
content-control.js
2 months ago
create-form.js
2 months ago
frontend.js
2 months ago
frontend.min.js
1 week ago
index.php
2 months ago
jcarousel.min.js
2 months ago
jquery.blockUI.js
2 months ago
mailoptin.js
2 months ago
member-directory.js
2 months ago
member-directory.min.js
2 months ago
pp-wp-editor.js
2 months ago
member-directory.js
66 lines
| 1 | (function ($) { |
| 2 | |
| 3 | $(function () { |
| 4 | |
| 5 | $('.ppressmd-member-directory-sorting-a-text').on('click', function (e) { |
| 6 | |
| 7 | e.preventDefault(); |
| 8 | |
| 9 | $(this).trigger('blur').next().toggle() |
| 10 | }); |
| 11 | |
| 12 | // close dropdown menu when outside is clicked. |
| 13 | $(document).on('click', function (e) { |
| 14 | if ($(e.target).prop('class') !== 'ppressmd-member-directory-sorting-a-text') { |
| 15 | $('.ppressmd-member-directory-sorting-a .ppressmd-new-dropdown').hide(); |
| 16 | } |
| 17 | }); |
| 18 | |
| 19 | var filterStateVar = null; |
| 20 | |
| 21 | $('.ppressmd-member-directory-filters-a').on('click', function (e) { |
| 22 | |
| 23 | var _this = $(this), parent = _this.parents('.ppressmd-member-directory-header'); |
| 24 | |
| 25 | filterStateVar = filterStateVar === null ? parent.hasClass('ppmd-filters-expand') : filterStateVar; |
| 26 | |
| 27 | e.preventDefault(); |
| 28 | |
| 29 | filterStateVar = !filterStateVar; |
| 30 | |
| 31 | $('a', _this).trigger('blur'); |
| 32 | |
| 33 | if (filterStateVar) { |
| 34 | $('.ppressmd-member-directory-filters-bar', parent).removeClass('.ppressmd-header-row-invisible') |
| 35 | .find('.ppressmd-search').css('display', 'grid'); |
| 36 | $('.ppress-material-icons.ppress-down', _this).hide(); |
| 37 | $('.ppress-material-icons.ppress-up', _this).css('display', 'inline'); |
| 38 | |
| 39 | } else { |
| 40 | $('.ppressmd-member-directory-filters-bar', parent).addClass('.ppressmd-header-row-invisible') |
| 41 | .find('.ppressmd-search').css('display', 'none'); |
| 42 | $('.ppress-material-icons.ppress-down', _this).css('display', 'inline'); |
| 43 | $('.ppress-material-icons.ppress-up', _this).hide(); |
| 44 | } |
| 45 | }); |
| 46 | |
| 47 | $('.ppmd-select2').select2(); |
| 48 | |
| 49 | $('.ppmd-date').each(function () { |
| 50 | $(this).flatpickr($(this).data('config')); |
| 51 | }) |
| 52 | }); |
| 53 | |
| 54 | $(window).on('load', function () { |
| 55 | |
| 56 | var $grid = $('.ppmd-members-wrap').imagesLoaded(function () { |
| 57 | $grid.masonry({ |
| 58 | itemSelector: '.ppmd-member-wrap', |
| 59 | columnWidth: '.ppmd-member-wrap', |
| 60 | gutter: '.ppmd-member-gutter', |
| 61 | percentPosition: true |
| 62 | }); |
| 63 | }); |
| 64 | }); |
| 65 | |
| 66 | })(jQuery); |