Skip to content

Demo code for .jquery property has bug... #52

@ncriss

Description

@ncriss

The docs at this location: http://api.jquery.com/jquery-2/

Has this demo code:
var a = { what: "A regular JS object" },
b = $('body');

if ( a.jquery ) { // falsy, since it's undefined
alert(' a is a jQuery object! ');
}

if ( b.jquery ) { // truthy, since it's a string
alert(' b is a jQuery object! ');
}

Shouldn't the first alert be "a is NOT a jQuery object"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions