To give you an example of all possible usages of data-domajax, we will process 2 ajax calls : the first one is the main domajax call contained inside buttons, and the second one is referenced by data-domajax-(event) option.
Event | Description | Test 1 | Test 2 |
---|---|---|---|
data-domajax-before |
Will process both ajax calls at the same time. |
Call 1: -
Call 2:
-
|
|
data-domajax-complete |
Will process the other ajax call when the first one will complete, whatever if it failed or succeeded. |
Call 1: -
Call 2:
-
|
Call 1: -
Call 2:
-
|
data-domajax-success |
Will process the other ajax call if the first one succeed. |
Call 1: -
Call 2:
-
|
Call 1: -
Call 2:
-
|
data-domajax-failure |
Will process the other ajax call if the first one fails. |
Call 1: -
Call 2:
-
|
Call 1: -
Call 2:
-
|
data-domajax-empty |
Will process the other ajax call only if the first ajax response is empty. |
Call 1: -
Call 2:
-
|
Call 1: -
Call 2:
-
|
data-domajax-not-empty |
Will process the other ajax call only if the first ajax response is not empty. |
Call 1: -
Call 2:
-
|
Call 1: -
Call 2:
-
|