skip to Main Content

Csrftoken is not defined – Jquery ajax

I'm using the following code as recommended by the documentation: function csrfSafeMethod(method) { // these HTTP methods do not require CSRF protection return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); } $("#formTabla").submit(function(event){ event.preventDefault(); var formData = new FormData(this); $.ajax({ beforeSend: function(xhr, settings) { if (!csrfSafeMethod(settings.type) &&…

VIEW QUESTION

jQuery Find not working with HTML template – Shopify

I have a Shopify liquid I load into HTML Template <script type="text/template" id="description"> <div class="product-ddd"> {{ product.description }} </div> </script> <script> $("#description").each(function() { console.log($(this).html()); }); </script> For some reason, find is not working <script> $("#description").find('h4').each(function() { console.log($(this).html()); }); </script> This…

VIEW QUESTION
Back To Top
Search