Already once met with the syntax:

$('#exampleModal').reveal({ close: function () { console.log("модальное окно начинает скрываться"); }, closed: function () { console.log("модальное окно только что скрылось"); }, }); 

How is it called and where to read about it?

  • so how is it? An object is passed as a parameter to a function .... whose keys are functions that are called at a specific time ..... what is determined by the plugin reveal within its own logic - Alexey Shimansky

1 answer 1

This design

 { close: function () { console.log("модальное окно начинает скрываться"); }, closed: function () { console.log("модальное окно только что скрылось"); }, } 

Called: Literal object . With this notation, you can create objects and initialize their fields.

In this case, an object is created with two fields: close , closed — each of the fields is a function.

  • If you put a minus, argue your actions - soledar10