1// JavaScript Document 2 3//--------------------------------------------------------------------------------------------------------- 4// show tpl name in console 5if(pageTemplate){ console.log(pageTemplate);} 6 7//--------------------------------------------------------------------------------------------------------- 8//--------------------------------------------------------------------------------------------------------- 9//--------------------------------------------------------------------------------------------------------- 10 11//Jquery Document 12 13 14//hack : cette fonction permet d'utilser $ au lieu de jQuery 15(function($) { 16 17//-------------------- 18 19$( document ).ready(function() { 20 21 22//----------------------------------- Toutes les pages ---------------------------------------------------------- 23 24 25// Test field crea compte 26 27/* 28$('#protection_contre_le_spam').change( function() { 29 30 var monaction = 'protection_contre_le_spam'; 31 32 $.ajax({ 33 url: ajaxurl, 34 type: "GET", 35 data: { 36 'action': 'lutte_spam', 37 'php_action' : monaction, 38 } 39 }).done(function(response) { 40 //$('.reponseajax').html(response); // Afficher le HTML 41 console.log(monaction); 42 43 }); 44 45}); 46 47*/ 48 49 50 51 52 /* 53 if( $('input[value="cb"]').is(':checked') ){ 54 //$( ".page-id-15677 .rwmb-button" ).addClass( "myClass" ); 55 $( ".rwmb-button" ).addClass( "myClass" ); 56 } 57 */ 58 59 // Show submit button if ... 60 61 $("input[value='ch']").click(function(){ 62 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 63 64 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 65 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 66 }); 67 68 $("input[value='es']").click(function(){ 69 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 70 71 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 72 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 73 }); 74 75 76 77 // par niveau d'adhésion 78 /* 79 80 $("input[value='12']").click(function(){ 81 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 82 83 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 84 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 85 }); 86 87 $("input[value='11']").click(function(){ 88 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 89 90 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 91 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 92 }); 93 94 $("input[value='8']").click(function(){ 95 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 96 97 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 98 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 99 }); 100 101 $("input[value='9']").click(function(){ 102 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 103 104 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 105 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 106 }); 107 108 $("input[value='10']").click(function(){ 109 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 110 111 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 112 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 113 }); 114 115 */ 116 117 118 119 120 121 122 $("input[value='ex']").click(function(){ 123 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 124 125 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 126 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 127 }); 128 129 $("input[value='ex_jtn']").click(function(){ 130 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "show" ); 131 132 $( ".page-id-15677 .asp_product_item" ).addClass( "hide" ); 133 $( ".page-id-15677 .asp_product_item" ).removeClass( "show" ); 134 }); 135 136 $("input[value='cb']").click(function(){ 137 $( "#choix-paiement-adhesion button[type='submit']" ).removeClass( "show" ); 138 $( "#choix-paiement-adhesion button[type='submit']" ).addClass( "hide" ); 139 140 $( ".page-id-15677 .asp_product_item" ).removeClass( "hide" ); 141 $( ".page-id-15677 .asp_product_item" ).addClass( "show" ); 142 143 }); 144 145 // Add attribute for recaptcha :form create user 146 /* 147 $('#submit_user').attr('data-sitekey', '6Le762EpAAAAAGA20PXG1jnHI_IlZH7dPlXR7R-Y'); 148 $('#submit_user').attr('data-callback', 'onSubmit'); 149 $('#submit_user').attr('data-action', 'submit'); 150 151 //$("p:first").addClass("intro"); 152 $('#submit_user').addClass('g-recaptcha'); 153 */ 154 155 156 157 158 159 //--------------------------------------------------------------------------------------------------------- 160 //external links in new window 161 //https://stackoverflow.com/questions/12041935/how-to-automatically-add-target-blank-to-external-links-only 162 $.expr[':'].external = function(obj){ 163 return !obj.href.match(/^mailto\:/) 164 && (obj.hostname != location.hostname) 165 && !obj.href.match(/^javascript\:/) 166 && !obj.href.match(/^$/) 167 }; 168 $('a:external').attr('target', '_blank'); 169 170 171 //--------------------------------------------------------------------------------------------------------- 172 // Open PDF links in a new window or tab 173 //https://gist.github.com/thedaviddias/4195094 174 $(document).on('click', 'a[href$=".pdf"]', function() { 175 $(this).attr('target', "_blank"); 176 }); 177 178 179 //----------------------------- Page spectacle --------------------------------------------------------------- 180 if(pageTemplate == 'single-spectacle.php' ){ 181 182 //--------------------------------------------------------------------------------------------------------- 183 // 184 185 186 187 } 188 189 190 191 192 193 194 195 196 197 198 199 200 201}); 202 203//------------------ 204//fin hack 205})(jQuery);
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.