1jQuery(document).ready(function( $ ) { 2 $(document).on('input', '.i3d-numeric.i3d-click-through', function() { 3 $('input[name="price"][type="radio"]').prop('checked', false); 4 }); 5 $(document).on('change', 'input[name="price"][type="radio"]', function() { 6 $('.i3d-numeric.i3d-click-through').val(''); 7 }); 8 // Fundraiser Profile | Fundraiser Details 9 $('.i3d-fundraiser-profile-toggle').on('click', function() { 10 $('body, html').toggleClass('show-pfd'); 11 }); 12 $('.i3d-fundraiser-profile-close').on('click', function() { 13 $('body, html').removeClass('show-pfd'); 14 }); 15 // Read Toggle 16 $('.i3-read-toggle').on('click', function(e) { 17 e.preventDefault(); 18 19 var $this = $(this); 20 var $moreText = $this.siblings('.i3-more-text'); 21 22 $moreText.slideToggle(300); 23 24 if ($this.text() === 'Read More') { 25 $this.text('Read Less'); 26 } else { 27 $this.text('Read More'); 28 } 29 }); 30 31 // Load More Updates 32 const $container = $('#fundraiser-updates-container'); 33 const $loadMoreBtn = $('#fundraiser-load-more'); 34 35 if ($container.length && $loadMoreBtn.length) { 36 $loadMoreBtn.on('click', function (e) { 37 e.preventDefault(); 38 39 let fundraiserId = $container.data('fundraiser-id'); 40 let page = parseInt($container.data('page')) + 1; 41 42 $loadMoreBtn.text('Loading...').prop('disabled', true); 43 44 $.ajax({ 45 url: WP_AJAX.ajaxurl, 46 type: 'POST', 47 dataType: 'json', 48 data: { 49 action: 'pillar_fundraisers_updates_load_more', 50 fundraiser_id: fundraiserId, 51 page: page, 52 limit: 3 53 }, 54 success: function (response) { 55 if (response.success) { 56 $container.append(response.data.html); 57 $container.data('page', page); 58 59 if (!response.data.has_more) { 60 $loadMoreBtn.hide(); 61 } else { 62 $loadMoreBtn.text('View all updates').prop('disabled', false); 63 } 64 } else { 65 $loadMoreBtn.text('No more updates').prop('disabled', true); 66 } 67 }, 68 error: function () { 69 $loadMoreBtn.text('Error, try again').prop('disabled', false); 70 } 71 }); 72 }); 73 } 74 75 // Social Share Copy 76 $('#i3d-fundraiser-copy-btn').on('click', function(e){ 77 e.preventDefault(); 78 var $input = $('#i3d-fundraiser-share-url'); 79 $input.select(); 80 $input[0].setSelectionRange(0, 99999); // Mobile ke liye 81 82 if (navigator.clipboard && navigator.clipboard.writeText) { 83 navigator.clipboard.writeText($input.val()).then(function(){ 84 showCopiedMsg(); 85 }).catch(function(){ 86 fallbackCopy($input); 87 }); 88 } else { 89 fallbackCopy($input); 90 } 91 }); 92 93 function fallbackCopy($input){ 94 document.execCommand('copy'); 95 showCopiedMsg(); 96 } 97 98 function showCopiedMsg(){ 99 var $msg = $('#i3d-fundraiser-copy-msg'); 100 $msg.fadeIn(200); 101 setTimeout(function(){ 102 $msg.fadeOut(200); 103 }, 2000); 104 } 105 106 $(document).on('click', '.toggle-readmore', function(e) { 107 e.preventDefault(); 108 109 var $this = $(this); 110 var $moreText = $this.siblings('.more-text'); 111 112 if ($moreText.is(':visible')) { 113 $moreText.slideUp(300, function() { 114 $this.text(' Read more'); 115 }); 116 } else { 117 $moreText.slideDown(300, function() { 118 $this.text(' Read less'); 119 }); 120 } 121 }); 122 123 $('.i3d-fundraiser-donate, .i3d-fundraiser-donate-close').on('click', function() { 124 $('.i3d-fundraiser-donate-overlay').toggleClass('active'); 125 }); 126});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.