Interface JQueryEventConstructor

Hierarchy

Callable

  • __call<T>(event: string, properties?: T): Event & T
  • The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.

    Check `trigger`'s documentation to see how to combine it with your own event object.

    see

    ``

    since

    1.6

    example
    //Create a new jQuery.Event object without the "new" operator.
    var e = jQuery.Event( "click" );
    ​
    // trigger an artificial click event
    jQuery( "body" ).trigger( e );
    example
    // Create a new jQuery.Event object with specified event properties.
    var e = jQuery.Event( "keydown", { keyCode: 64 } );
    ​
    // trigger an artificial keydown event with keyCode 64
    jQuery( "body" ).trigger( e );

    Type parameters

    • T: object

    Parameters

    • event: string
    • Optional properties: T

    Returns Event & T

Index

Constructors

Constructors

constructor

  • new JQueryEventConstructor<T>(event: string, properties?: T): Event & T
  • The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.

    Check `trigger`'s documentation to see how to combine it with your own event object.

    see

    ``

    since

    1.6

    example
    //Create a new jQuery.Event object without the "new" operator.
    var e = jQuery.Event( "click" );
    ​
    // trigger an artificial click event
    jQuery( "body" ).trigger( e );
    example
    // Create a new jQuery.Event object with specified event properties.
    var e = jQuery.Event( "keydown", { keyCode: 64 } );
    ​
    // trigger an artificial keydown event with keyCode 64
    jQuery( "body" ).trigger( e );

    Type parameters

    • T: object

    Parameters

    • event: string
    • Optional properties: T

    Returns Event & T