Another very strong point of jQuery is the event handler.
Try this example by adding this code to an event handler.
You can call this function from an event handler or somewhere else.
For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc.
Na przykład można dodać kod do obsługi zdarzenia zmiany rozmiaru formularza, aby zmienić położenie kontrolki, tak aby pozostawała wyśrodkowana na formularzu itp.
Passing arguments to the event handler
Several bugs were fixed with event handler logging, embedded perl, CPU hogging issues under OpenBSD, time period calculation routines, scheduling checks from the Web interface, and the handling of problem states after Nagios restarted.
Kilka błędów zostało zainstalowanych przy użyciu rejestratora obsługi zdarzeń, osadzonego perla, problemów związanych z higieną pracy procesora w systemie OpenBSD, procedurą obliczania timeperiod, sprawdzaniem harmonogramu z poziomu interfejsu sieci Web oraz obsługą stanów problemów po ponownym uruchomieniu programu Nagios.
If it has, the event handler is executed.
There is an additional event handler that we can place on the observes element which is onbroadcast.
Jest jeszcze dodatkowy manipulator wydarzeń, którego możemy umieścić w elemencie observes ustawionym na onbroadcast.
When the user selects an element, an event handler is called that executes code that the programmer created to perform the action for that list item.
From the developer point of view the usage of the themes in the application, is quite simple and consists of (almost) selection of theme name inside of appropriate event handler (e.g. after pressing the button).
Jeżeli chodzi o obsługę tematów w aplikacji, dzieje się to dość prosto i sprowadza się (prawie) do wybrania nazwy interesującego nas tematu w obsłudze odpowiedniego zdarzenia (np. po naciśnięciu przycisku).
The signature of an event handler must be as follows
The first way is the simplest and just requires that you use the command event handler on the key element.
When a user enters data into a controlled component a change event handler is triggered and your code decides whether the input is valid (by re-rendering with the updated value).
Gdy użytkownik wprowadzi do niego dane, wywoływana jest odpowiednia procedura obsługi zdarzenia i to twój kod decyduje, czy wartość jest poprawna (poprzez ponowne wyrenderowanie z nową wartością).