Dzień dobry,
Czy wiecie może dlaczego poniższy kod nie działa? Za każdym razem zwraca fail. Konsola -> https://pastebin.com/TABQCjXe
jQuery(document).ready(function($) { // This does the ajax request $.ajax({ type: 'post', url: ajaxurl, data: { 'action':'prefix_load_cat_posts' }, success:function(data) { // This outputs the result of the ajax request console.log(data); $( ".prefix_load_cat_posts" ).append("success"); }, error: function(errorThrown){ console.log(errorThrown); $( ".prefix_load_cat_posts" ).append("fail"); } }); });
Albo ja nie umiem czytac twojej konsoli, albo wkleiles nam jakas sieczke...
Tak czy siak jak w tej sieczce widze:
statusText: "Bad Request"
Co tu mozna dodac wiecej... no chyba nic
Znalazłem źródło problemu, trzeba użyć
'action':'load-filter'
'action':'prefix_load_cat_posts'
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)