.die()Возвращает: jQueryversion deprecated: 1.7, removed: 1.9

Описание: У выбранных элементов страницы, удаляет обработчики событий, установленные методом live().

  • Добавлен в версии: 1.4.1.die()

    • This signature does not accept any arguments.
  • Добавлен в версии: 1.3.die( eventType [, handler ] )

    • eventType
      Тип: String
      A string containing a JavaScript event type, such as click or keydown.
    • handler
      Тип: String
      The function that is no longer to be executed.
  • Добавлен в версии: 1.4.3.die( events )

    • events
      Тип: PlainObject
      A plain object of one or more event types, such as click or keydown and their corresponding functions that are no longer to be executed.

Any handler that has been attached with .live() can be removed with .die(). This method is analogous to calling .off() with no arguments, which is used to remove all handlers attached with .on(). See the discussions of .live() and .off() for further details.

If used without an argument, .die() removes all event handlers previously attached using .live() from the elements.

As of jQuery 1.7, use of .die() (and its complementary method, .live()) is not recommended. Instead, use .off() to remove event handlers bound with .on()

Note: In order for .die() to function correctly, the selector used with it must match exactly the selector initially used with .live().

Примеры использования