1jQuery(document).ready(function($) { 2 3 // ã¤ã³ãã¬ãã·ã§ã³ãã¯ãªãã¯çãã³ã³ãã¼ã¸ã§ã³ç 4 $('#js-cta').on('inview', function(event, isinview) { 5 6 var cta_index; 7 if ($(this).hasClass('p-cta--1')) { 8 cta_index = 1; 9 } else if ($(this).hasClass('p-cta--2')) { 10 cta_index = 2; 11 } else { 12 cta_index = 3; 13 } 14 15 if (isinview) { 16 $.ajax({ 17 type: 'post', 18 url: tcd_cta.admin_url, 19 data: { 20 'action' : 'tcd_cta_impression', 21 'security' : tcd_cta.ajax_nonce, 22 'cta_index' : cta_index 23 }, 24 success: function(response) { 25 //console.log('success'); 26 }, 27 error: function() { 28 //console.log('error'); 29 }, 30 complete: function() { 31 //console.log('complete'); 32 } 33 }); 34 // 1度ã®è¡¨ç¤ºã§ã«ã¦ã³ãã¯1åã¾ã§ã®ãããinview ããªãã«ãã 35 $('#js-cta').off('inview'); 36 } 37 }); 38 39 // ã¯ãªãã¯æ°ãã¯ãªãã¯çãCookie 40 $('#js-cta__btn').click(function() { 41 42 var cta_index; 43 var cta = $(this).parents('#js-cta'); 44 45 if (cta.hasClass('p-cta--1')) { 46 cta_index = 1; 47 } else if (cta.hasClass('p-cta--2')) { 48 cta_index = 2; 49 } else { 50 cta_index = 3; 51 } 52 53 $.ajax({ 54 type: 'post', 55 url: tcd_cta.admin_url, 56 data: { 57 'action' : 'tcd_cta_click', 58 'security' : tcd_cta.ajax_nonce, 59 'cta_index' : cta_index 60 }, 61 success: function(response) { 62 //console.log('success'); 63 }, 64 error: function() { 65 //console.log('error'); 66 }, 67 complete: function() { 68 //console.log('complete'); 69 } 70 }); 71 }); 72 73 // ã³ã³ãã¼ã¸ã§ã³ãã³ã³ãã¼ã¸ã§ã³ç 74 $('#js-cta-conversion').on('inview', function(event, isinview) { 75 76 if (isinview) { 77 $.ajax({ 78 type: 'post', 79 url: tcd_cta.admin_url, 80 data: { 81 'action' : 'tcd_cta_conversion', 82 'security' : tcd_cta.ajax_nonce, 83 }, 84 success: function(response) { 85 //console.log('success'); 86 }, 87 error: function() { 88 //console.log('error'); 89 }, 90 complete: function() { 91 //console.log('complete'); 92 } 93 }); 94 // inview ããªãã«ãã 95 $('#js-cta-conversion').off('inview'); 96 } 97 }); 98 99 // ãªã»ãã 100 $('.js-cta-reset').click(function(event) { 101 102 var table = $(this).parents('.c-ab-table'); 103 104 event.preventDefault(); 105 106 if (window.confirm(tcd_cta.confirm_text)) { 107 108 // ãªã»ããããè¨äºä¸CTAã®çªå· 109 var cta_index = $(this).data('cta-index'); 110 111 $.ajax({ 112 type: 'post', 113 url: tcd_cta.admin_url, 114 data: { 115 'action' : 'tcd_cta_reset', 116 'security' : tcd_cta.ajax_nonce, 117 'cta_index' : cta_index 118 }, 119 success: function(response) { 120 121 // è¦ãç®ä¸ã®å¤ã夿´ãã¹ããã¼ãã«ã®è¡ãåå¾ 122 var abTableRow = table.find('.c-ab-table__row').eq(cta_index); 123 124 // ã¤ã³ãã¬ãã·ã§ã³ãã¯ãªãã¯æ°ãã¯ãªãã¯çãã³ã³ãã¼ã¸ã§ã³æ°ãã³ã³ãã¼ã¸ã§ã³çã®æ°å¤ã0ã«ãã 125 abTableRow.find('.c-ab-table__impression').text('0'); 126 abTableRow.find('.c-ab-table__click').text('0'); 127 abTableRow.find('.c-ab-table__ctr').text('0%'); 128 abTableRow.find('.c-ab-table__conversion').text('0'); 129 abTableRow.find('.c-ab-table__cvr').text('0%'); 130 131 //console.log('success'); 132 }, 133 error: function() { 134 //console.log('error'); 135 }, 136 complete: function() { 137 //console.log('complete'); 138 } 139 }); 140 141 } 142 143 }); 144 145});
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.