R
R
RushV2021-08-02 16:20:23
JavaScript
RushV, 2021-08-02 16:20:23

Why doesn't af_complete AjaxForm work?

I welcome everyone!
I'm trying to add a class.
The form sends everything, everything works, I try to add a class to the button.

$(document).on('af_complete', function(event,res) {
       if(res.success){
            $('.btn-close').addClass("class-bss");
       	    response.message='';
       }
});

Where to add
6107f6093d20b346448159.jpeg
the Console
6107f62eb448d352754912.jpeg

6107f6e61025b195353200.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Tarasov, 2021-08-02
@an-tar

Where to add? how to add? Please show the full code of the page, does jQuery work, does the ajaxForm script work? Where and in what order?

D
Danny Arty, 2021-08-02
@DanArst

Judging by the error, you need to include jquery.form.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question