interface JQuery {
    datagrid: any;
    drawer: any;
    droppable: any;
    resizable: any;
    sidemenu: any;
    tooltip: any;
    tree: any;
    accordion(p1?: any, p2?: any): any;
    attr(attributeName: string, value_function: string | number | ((this: TElement, index: number, attr: string) => string | number | void)): this;
    attr(attributes: PlainObject<any>): this;
    attr(attributeName: string): string;
    attr(p1?: any, p2?: any): any;
    ColorPicker(p1?: any, p2?: any): any;
    ColorPickerHide(p1?: any, p2?: any): any;
    combobox(p1?: any, p2?: any): any;
    dialog(p1?: any, p2?: any): any;
    draggable(p1?: any, p2?: any): any;
    layout(p1?: any, p2?: any): any;
    linkbutton(p1?: any, p2?: any): any;
    menu(p1?: any, p2?: any): any;
    navpanel(p1?: any, p2?: any): any;
    panel(p1?: any, p2?: any): any;
    tabs(p1?: any, p2?: any): any;
    window(p1?: any, p2?: any): any;
}

Properties

datagrid: any
drawer: any
droppable: any
resizable: any
sidemenu: any
tooltip: any
tree: any

Methods

  • Set one or more attributes for the set of matched elements.

    Parameters

    • attributeName: string

      The name of the attribute to set.

    • value_function: string | number | ((this: TElement, index: number, attr: string) => string | number | void)

      @param value_function

      • value — A value to set for the attribute. If null, the specified attribute will be removed (as in removeAttr .removeAttr()).
      • function — A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.

    Returns this

    <a href="https://api.jquery.com/attr/">https://api.jquery.com/attr/</a>

    1.0

    1.1

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>attr demo</title>
    <script src="https://code.jquery.com/jquery-3.3.1.js"></script>
    </head>
    <body>
    ​
    <img title="hat.gif">
    ​
    <script>
    $( "img" ).attr( "src", function() {
    return "/resources/" + this.title;
    });
    </script>
    ​
    </body>
    </html>
  • Set one or more attributes for the set of matched elements.

    Parameters

    • attributes: PlainObject<any>

      An object of attribute-value pairs to set.

    Returns this

    <a href="https://api.jquery.com/attr/">https://api.jquery.com/attr/</a>

    1.0

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>attr demo</title>
    <style>
    img {
    padding: 10px;
    }
    div {
    color: red;
    font-size: 24px;
    }
    </style>
    <script src="https://code.jquery.com/jquery-3.3.1.js"></script>
    </head>
    <body>
    ​
    <img>
    <img>
    <img>
    ​
    <div><b>Attribute of Ajax</b></div>
    ​
    <script>
    $( "img" ).attr({
    src: "/resources/hat.gif",
    title: "jQuery",
    alt: "jQuery Logo"
    });
    $( "div" ).text( $( "img" ).attr( "alt" ) );
    </script>
    ​
    </body>
    </html>
  • Get the value of an attribute for the first element in the set of matched elements.

    Parameters

    • attributeName: string

      The name of the attribute to get.

    Returns string

    <a href="https://api.jquery.com/attr/">https://api.jquery.com/attr/</a>

    1.0

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>attr demo</title>
    <style>
    em {
    color: blue;
    font-weight: bold;
    }
    div {
    color: red;
    }
    </style>
    <script src="https://code.jquery.com/jquery-3.3.1.js"></script>
    </head>
    <body>
    ​
    <p>Once there was a <em title="huge, gigantic">large</em> dinosaur...</p>
    ​
    The title of the emphasis is:<div></div>
    ​
    <script>
    var title = $( "em" ).attr( "title" );
    $( "div" ).text( title );
    </script>
    ​
    </body>
    </html>
  • Parameters

    • Optionalp1: any
    • Optionalp2: any

    Returns any