Explain this javascript to me

I'm new to jQuery, can anyone explain what this code does:

$("#currency form").submit(function(e) {

        triggers.eq(1).overlay().close();
        return e.preventDefault();
    });
+3
source share
3 answers

The first line starts the function that processes the event of submitall tags formin the element with the identifier currency.
Documentation: Selectors , submitEvent

The second line closes the overlay in the second element in the variable triggers.
Documentation: eqmethod , overlay plugin

, . ( e.preventDefault(); / return false;)
: event.preventDefault,

+12

triggers= jQuery

triggers.eq(1)= jquery

triggers.eq(1).overlay()= overlay ()

triggers.eq(1).overlay().close()= .

return e.preventDefault(); = ( )

+2

:

  • ( jQuery).
  • .
  • .
  • .
+2

Source: https://habr.com/ru/post/1734908/


All Articles