PluginProbe ʕ •ᴥ•ʔ
Post Grid, Slider & Carousel Ultimate – with Shortcode, Gutenberg Block & Elementor Widget / 1.8.1
Post Grid, Slider & Carousel Ultimate – with Shortcode, Gutenberg Block & Elementor Widget v1.8.1
1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.7 1.3.8 1.4.0 1.4.1 1.4.2 1.4.3 1.6.0 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7 1.8
post-grid-carousel-ultimate / admin / admin.js
post-grid-carousel-ultimate / admin Last commit date
admin.css 3 years ago admin.js 3 years ago block-editor.css 3 years ago index.php 3 years ago notice.css 3 years ago
admin.js
111 lines
1 (function($){
2 $(document).ready(function($) {
3 $(".lcsp-tabs-menu a").click(function(event) {
4 event.preventDefault();
5 $(this).parent().addClass("current");
6 $(this).parent().siblings().removeClass("current");
7 var tab = $(this).attr("href");
8 $(".adl-tab-content").not(tab).css("display", "none");
9 $(tab).fadeIn();
10 });
11
12 $("#sel5").change(function() {
13 if ($(this).val() == 'grid') {
14
15 $("#tab2").css('display', 'block');
16 $("#tab1").css('display', 'none');
17 $("#tab3").css('display', 'none');
18
19 }
20 if ($(this).val() == 'isotope') {
21
22 $("#tab2").css('display', 'none');
23 $("#tab1").css('display', 'none');
24 $("#tab3").css('display', 'block');
25 $("#tab4").css('display', 'none');
26
27 }
28 if ($(this).val() == 'carousel') {
29 $("#tab2").css('display', 'none');
30 $("#tab1").css('display', 'block');
31 $("#tab3").css('display', 'none');
32 $("#tab4").css('display', 'none');
33
34 }
35 });
36
37 /* Read more type color option */
38 $('.gc-read-more-type-section .pgcu_read_more_depend').on('change', function(){
39 if($(this).val() === 'link'){
40 $('.read_more_link_color_option').show();
41 $('.read_more_button_color_option').hide();
42 }else if($(this).val() === 'button'){
43 $('.read_more_link_color_option').hide();
44 $('.read_more_button_color_option').show();
45 }
46 })
47 if($('.gc-read-more-type-section .pgcu_read_more_depend option:selected').val() === 'link'){
48 $('.read_more_link_color_option').show();
49 $('.read_more_button_color_option').hide();
50 }else if($('.gc-read-more-type-section .pgcu_read_more_depend option:selected').val() === 'button'){
51 $('.read_more_link_color_option').hide();
52 $('.read_more_button_color_option').show();
53 }
54
55 $("#pgcu_post_type").change(function() {
56 var data = {
57 'action': 'pgcu_post_type',
58 'post_type': $(this).val(), // that's how we get params from wp_localize_script() function
59 };
60
61 $.ajax({ // you can also use $.post here
62 url : pgcu_ajax.ajaxurl, // AJAX handler
63 data : data,
64 type : 'POST',
65 success : function( data ){
66 if( data ) {
67 $('.pgcu_post_type_depend').empty().append(data);
68 }
69 }
70 });
71 });
72
73
74 jQuery('.cpa-color-picker').wpColorPicker();
75
76 /* Read more section */
77 $('input[name="gc[display_header_title]"]').each(function(id, elm){
78 $(elm).on('change', function(){
79 if($(elm).val() === 'no'){
80 $('.pgcu_header_title').css('display', 'none');
81 }else{
82 $('.pgcu_header_title').css('display', 'table-row');
83 }
84 })
85 })
86
87 /* Read more section */
88 $('input[name="gc[display_read_more]"]').each(function(id, elm){
89 $(elm).on('change', function(){
90 if($(elm).val() === 'no'){
91 $('.gc-read-more-type-section').css('display', 'none');
92 }else{
93 $('.gc-read-more-type-section').css('display', 'table-row');
94 }
95 })
96 })
97 });
98
99
100 window.addEventListener('load', ()=>{
101 let readmore2 = document.getElementById('gc[display_read_more2]');
102 let title2 = document.getElementById('gc[display_header_title2]');
103 if(readmore2 !== null && readmore2.hasAttribute('checked')){
104 document.querySelector('.gc-read-more-type-section').style.display = 'none';
105 }
106
107 if(title2 !== null && title2.hasAttribute('checked')){
108 document.querySelector('.pgcu_header_title').style.display = 'none';
109 }
110 })
111 })(jQuery)